Skip to content

Commit 51e5c13

Browse files
authored
Merge pull request #89 from cortex-command-community/pre611-minor-fixes
Survival and BunkerBreach explicitly set door ownership
2 parents 7f10f42 + 7531c81 commit 51e5c13

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
2828

2929
- Fixed an issue where glows wouldn't render if the EffectStopTime was lower than the simulation deltatime.
3030

31+
- Fixed an issue where sometimes doors were owned by the wrong team in Bunker Breach and Survival activities.
32+
3133
- Fixed an issue where a mission-only item was being bought by the AI.
3234

3335
</details>

Data/Base.rte/Activities/BunkerBreach.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ function BunkerBreach:SetupDefenderActors()
157157
elseif actor.Team ~= self.defenderTeam then
158158
MovableMan:ChangeActorTeam(actor, self.defenderTeam);
159159
end
160+
elseif IsADoor(actor) then
161+
-- Give every door to the defender team
162+
actor.Team = self.defenderTeam;
160163
end
161164
end
162165

Data/Base.rte/Activities/Survival.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ function Survival:StartNewGame()
6767
self.randomSpawnTime = 4000;
6868
end
6969
self.enemySpawnTimeLimit = (self.baseSpawnTime + math.random(self.randomSpawnTime)) * rte.SpawnIntervalScale;
70+
71+
for actor in MovableMan.AddedActors do
72+
if IsADoor(actor) then
73+
-- Give every door to the player team
74+
actor.Team = self:GetTeamOfPlayer(Activity.PLAYER_1);
75+
end
76+
end
7077

7178
self:SetupHumanPlayerBrains();
7279
end

0 commit comments

Comments
 (0)