Skip to content

Commit

Permalink
room: fix tilt being disabled when not on a walkable
Browse files Browse the repository at this point in the history
  • Loading branch information
walkawayy committed Aug 6, 2024
1 parent 0a24856 commit 9dd9718
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/game/room.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,7 @@ bool Room_IsOnWalkable(
}

int16_t height = sector->floor << 8;
bool object_found = false;

int16_t *floor_data = &g_FloorData[sector->index];
int16_t type;
Expand Down Expand Up @@ -1027,6 +1028,7 @@ bool Room_IsOnWalkable(
OBJECT_INFO *object = &g_Objects[item->object_number];
if (object->floor) {
object->floor(item, x, y, z, &height);
object_found = true;
}
} else if (TRIG_BITS(trigger) == TO_CAMERA) {
trigger = *floor_data++;
Expand All @@ -1036,9 +1038,7 @@ bool Room_IsOnWalkable(
}
} while (!(type & END_BIT));

if (room_height == height) {
return true;
}
return object_found && room_height == height;

return false;
}

0 comments on commit 9dd9718

Please sign in to comment.