From b12fb3197d19ac923c2cabff3820e243e4b1e6dc Mon Sep 17 00:00:00 2001 From: pawnishoovy <54544349+pawnishoovy@users.noreply.github.com> Date: Thu, 25 Dec 2025 08:21:04 +0200 Subject: [PATCH] Fix wrong initialization of capture progress for neutral GenericCapturables --- .../GenericCapturable/GenericCapturable.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/GenericCapturable/GenericCapturable.lua b/Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/GenericCapturable/GenericCapturable.lua index ac3e84d19c..601833b93b 100644 --- a/Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/GenericCapturable/GenericCapturable.lua +++ b/Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/GenericCapturable/GenericCapturable.lua @@ -46,7 +46,18 @@ function Create(self) end end - self.captureProgress = self:NumberValueExists("captureProgress") and self:GetNumberValue("captureProgress") or 1; + -- If we have a saved value, use that. + if self:NumberValueExists("captureProgress") then + self.captureProgress = self:GetNumberValue("captureProgress") + else + -- Otherwise, initialize properly according to whether we are captured by a real team or not by default. + if self.Team == -1 then + self.captureProgress = 0.0; + else + self.captureProgress = 1.0; + end + end + self.capturingTeam = self:NumberValueExists("capturingTeam") and self:GetNumberValue("capturingTeam") or self.Team; self.dominantTeam = self:NumberValueExists("dominantTeam") and self:GetNumberValue("dominantTeam") or self.Team;