Compare commits

...

2 Commits

View File

@ -102,10 +102,11 @@ Foundation.prototype.GetNumBuilders = function()
};
Foundation.prototype.IsFinished = function () {
if (this.GetBuildProgress() == 1.0 && this.entsToDestroy)
if (this.GetBuildProgress() == 1.0 && this.entsToDestroy) {
for (let ent of this.entsToDestroy)
Engine.DestroyEntity(ent);
this.entsToDestroy = [];
}
return this.GetBuildProgress() == 1.0;
};
@ -267,7 +268,10 @@ Foundation.prototype.Commit = function () {
// TODO: What if an obstruction has no UnitAI?
}
if (this.finalTemplateName.indexOf("wall") === -1 && this.finalTemplateName.indexOf("palisades") === -1) {
warn()
return false;
}
// TODO: maybe we should tell the builder to use a special
// animation to indicate they're waiting for people to get
// out the way