Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 2c4d7de

Browse files
committed
Make wave defense select switch to the player brain on start so the camera isn't wandering around somewhere stupidly when you have deployments
1 parent 10e5092 commit 2c4d7de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Data/Base.rte/Activities/WaveDefense.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ function WaveDefense:StartNewGame()
108108
end
109109

110110
self:CheckBrains();
111+
112+
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
113+
if self:PlayerActive(player) and self:PlayerHuman(player) then
114+
if self:GetPlayerBrain(player) then
115+
self:SwitchToActor(self:GetPlayerBrain(player), player, self:GetTeamOfPlayer(player));
116+
end
117+
end
118+
end
111119
end
112120

113121
function WaveDefense:ResumeLoadedGame()

0 commit comments

Comments
 (0)