From 2813270802f2a90d1d01e28ffe94b16533dbf6dc Mon Sep 17 00:00:00 2001 From: real_tabasco_sauce Date: Mon, 2 Sep 2024 02:35:52 +0200 Subject: [PATCH] add missing check to foundation.js --- community-mod/simulation/components/Foundation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community-mod/simulation/components/Foundation.js b/community-mod/simulation/components/Foundation.js index 321f821..7fe576a 100644 --- a/community-mod/simulation/components/Foundation.js +++ b/community-mod/simulation/components/Foundation.js @@ -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);