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

Commit 2bc9a02

Browse files
committed
Fixed issue where brain without Team 0 assigned in INI would screw up for attacker team
Added dummy brainbot to Actors group
1 parent 1e296a7 commit 2bc9a02

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Base.rte/Activities/BunkerBreach.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function BunkerBreach:StartActivity()
138138
end
139139
end
140140

141-
--Make sure all human players have brains
141+
--Make sure all defending human players have brains
142142
if (self.defenderTeam ~= self.CPUTeam) then
143143
local playerDefenderBrainsAssignedCount = 0;
144144
local brainToAssignToPlayer;
@@ -151,7 +151,6 @@ function BunkerBreach:StartActivity()
151151
brainToAssignToPlayer.Pos = self.defenderBrain.Pos + Vector(playerDefenderBrainsAssignedCount * 10 * self.defenderBrain.FlipFactor, 0);
152152
MovableMan:AddActor(brainToAssignToPlayer);
153153
end
154-
155154
self:SwitchToActor(brainToAssignToPlayer, player, self.defenderTeam);
156155
self:SetPlayerBrain(brainToAssignToPlayer, player);
157156
self:SetObservationTarget(brainToAssignToPlayer.Pos, player);
@@ -565,8 +564,8 @@ function BunkerBreach:CreateBrainBot(team)
565564
else
566565
actor:AddInventoryItem(RandomHDFirearm("Weapons - Secondary", tech));
567566
end
568-
actor.AIMode = Actor.AIMODE_SENTRY;
569-
actor.Team = team;
570567
end
568+
actor.AIMode = Actor.AIMODE_SENTRY;
569+
actor.Team = team;
571570
return actor;
572571
end

Dummy.rte/Actors/Brains/Brainbot/Brainbot.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ AddEffect = Attachable
146146
AddActor = AHuman
147147
PresetName = Dummy Coordinator
148148
Description = Mobile Dummy command unit. Built atop of the weak Dummy frame, it is quite weak by itself.
149+
AddToGroup = Actors
149150
AddToGroup = Brains
150151
Mass = 36
151152
GoldValue = 100

0 commit comments

Comments
 (0)