Skip to content

Commit e3865fc

Browse files
committed
Opening/closing all doors for AI teams is easy enough to achieve by just calling per-team repeatedly, so doing it like this is more flexible
1 parent 8391907 commit e3865fc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

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

4848
- The Signal Hunt activity no longer has a preview image, as it was not formatted correctly and spoiled the interior structure of the cave.
4949

50+
- `MovableMan:OpenAllDoors()`, when passed `NOTEAM`, will now open/close doors specifically for `NOTEAM` (instead of all doors).
51+
5052
</details>
5153

5254
<details><summary><b>Fixed</b></summary>

Source/Managers/MovableMan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ int MovableMan::GetTeamMOIDCount(int team) const {
11261126
void MovableMan::OpenAllDoors(bool open, int team) const {
11271127
for (std::deque<Actor*> actorDeque: {m_Actors, m_AddedActors}) {
11281128
for (Actor* actor: actorDeque) {
1129-
if (ADoor* actorAsADoor = dynamic_cast<ADoor*>(actor); actorAsADoor && (team == Activity::NoTeam || actorAsADoor->GetTeam() == team)) {
1129+
if (ADoor* actorAsADoor = dynamic_cast<ADoor*>(actor); actorAsADoor && actorAsADoor->GetTeam() == team) {
11301130
if (actorAsADoor->GetDoorState() != (open ? ADoor::DoorState::OPEN : ADoor::DoorState::CLOSED)) {
11311131
actorAsADoor->Update();
11321132
actorAsADoor->SetClosedByDefault(!open);

0 commit comments

Comments
 (0)