File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/GenericCapturable Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,18 @@ function Create(self)
4646 end
4747 end
4848
49- self .captureProgress = self :NumberValueExists (" captureProgress" ) and self :GetNumberValue (" captureProgress" ) or 1 ;
49+ -- If we have a saved value, use that.
50+ if self :NumberValueExists (" captureProgress" ) then
51+ self .captureProgress = self :GetNumberValue (" captureProgress" )
52+ else
53+ -- Otherwise, initialize properly according to whether we are captured by a real team or not by default.
54+ if self .Team == - 1 then
55+ self .captureProgress = 0.0 ;
56+ else
57+ self .captureProgress = 1.0 ;
58+ end
59+ end
60+
5061 self .capturingTeam = self :NumberValueExists (" capturingTeam" ) and self :GetNumberValue (" capturingTeam" ) or self .Team ;
5162 self .dominantTeam = self :NumberValueExists (" dominantTeam" ) and self :GetNumberValue (" dominantTeam" ) or self .Team ;
5263
You can’t perform that action at this time.
0 commit comments