Skip to content

Commit

Permalink
tr2/objects/door: reset sector tilt on closed doors
Browse files Browse the repository at this point in the history
The legacy approach would reset the FD index to 0, but this was missed
in the FD refactor in #1896. The result was NO_HEIGHT would be
manipulated by the tilt values and hence could produce invisible
geometry.
  • Loading branch information
lahm86 committed Nov 27, 2024
1 parent c7208c9 commit fd005ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tr2/game/objects/general/door.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ void __cdecl Door_Shut(DOORPOS_DATA *const d)
sector->box = NO_BOX;
sector->ceiling.height = NO_HEIGHT;
sector->floor.height = NO_HEIGHT;
sector->floor.tilt = 0;
sector->ceiling.tilt = 0;
sector->portal_room.sky = NO_ROOM_NEG;
sector->portal_room.pit = NO_ROOM_NEG;
sector->portal_room.wall = NO_ROOM;
Expand Down

0 comments on commit fd005ac

Please sign in to comment.