Skip to content

Commit da2f645

Browse files
committed
Fix wave defense so it doesn't crash the game if there are deployments with other teams, by trying to change actors' teams in the incorrect way!
1 parent 691ceec commit da2f645

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Data/Base.rte/Activities/WaveDefense.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ end
9494

9595
function WaveDefense:StartNewGame()
9696
self:SetTeamFunds(self:GetStartingGold(), self.playerTeam);
97-
self:CheckBrains();
9897

9998
self.triggerWaveInit = true;
10099
self.wave = 1;
@@ -105,8 +104,10 @@ function WaveDefense:StartNewGame()
105104
if actor.ClassName == "AHuman" or actor.ClassName == "ACrab" then
106105
actor.AIMode = Actor.AIMODE_SENTRY;
107106
end
108-
actor.Team = self.playerTeam;
107+
MovableMan:ChangeActorTeam(actor, self.playerTeam);
109108
end
109+
110+
self:CheckBrains();
110111
end
111112

112113
function WaveDefense:ResumeLoadedGame()

0 commit comments

Comments
 (0)