add missing check to foundation.js

This commit is contained in:
real_tabasco_sauce 2024-09-02 02:35:52 +02:00
parent 314d5da201
commit 2813270802

View File

@ -102,7 +102,7 @@ Foundation.prototype.GetNumBuilders = function()
};
Foundation.prototype.IsFinished = function () {
if (this.GetBuildProgress() == 1.0)
if (this.GetBuildProgress() == 1.0 && this.entsToDestroy)
for (let ent of this.entsToDestroy)
Engine.DestroyEntity(ent);