Skip to content

Commit

Permalink
room: fix invalid walkable detection (#1453)
Browse files Browse the repository at this point in the history
This avoids testing the floor height for the on walkable check when the
corresponding sector does not have a trigger. This is equivalent to
not finding a walkable object.

Resolves #1452.
  • Loading branch information
lahm86 authored Aug 24, 2024
1 parent 8f75872 commit 806dba7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## [Unreleased](https://github.com/LostArtefacts/TR1X/compare/stable...develop) - ××××-××-××
- fixed holstering pistols hiding the gun meshes 1 frame too early (#1449, regression from 0.6)
- fixed Lara's sliding animation sometimes being interrupted by a stumble (#1452, regression from 4.3)
- improved logs module names readability
- improved crash debug information on Windows

Expand Down
5 changes: 2 additions & 3 deletions src/game/room.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,12 +1014,11 @@ bool Room_IsOnWalkable(
const int32_t z, const int32_t room_height)
{
sector = Room_GetPitSector(sector, x, z);

int16_t height = sector->floor.height;
if (sector->trigger == NULL) {
return room_height == height;
return false;
}

int16_t height = sector->floor.height;
bool object_found = false;
for (int32_t i = 0; i < sector->trigger->command_count; i++) {
const TRIGGER_CMD *const cmd = &sector->trigger->commands[i];
Expand Down

0 comments on commit 806dba7

Please sign in to comment.