Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tr1|tr2/objects/door: reset sector tilt on closed doors #1959

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Nov 26, 2024

Resolves #1958.

Checklist

  • I have read the coding conventions
  • I have added a changelog entry about what my pull request accomplishes, or it is an internal change

Description

Before the FD refactor in both games, closing a door would reset the sector FD index to 0, and so that meant functions such as Room_GetCeiling would not interpret tilt values. I missed applying the equivalent reset in both #1433 and #1896 and so the result was that NO_HEIGHT values would be adjusted with tilt values, and hence produce something other than NO_HEIGHT and therefore potential invisible geometry.

Quite specific still for the issue itself: you need a door that's not on a portal sector in a room above, and there must be tilt geometry defined. This doesn't happen in OG TR1 AFAIK, so I've attached a test level.

level1.zip

The legacy approach would reset the FD index to 0, but this was missed
in the FD refactor in LostArtefacts#1433. The result was NO_HEIGHT would be
manipulated by the tilt values and hence could produce invisible
geometry.
The legacy approach would reset the FD index to 0, but this was missed
in the FD refactor in LostArtefacts#1896. The result was NO_HEIGHT would be
manipulated by the tilt values and hence could produce invisible
geometry.
@lahm86 lahm86 added TRX bug A bug with TRX TR2 TR1 labels Nov 26, 2024
@lahm86 lahm86 self-assigned this Nov 26, 2024
@lahm86 lahm86 requested review from a team as code owners November 26, 2024 19:29
@lahm86 lahm86 requested review from rr-, walkawayy and aredfan and removed request for a team November 26, 2024 19:29
Copy link

Copy link
Collaborator

@aredfan aredfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the sameday bugfix. 👍

@lahm86 lahm86 merged commit fd005ac into LostArtefacts:develop Nov 27, 2024
6 checks passed
@lahm86 lahm86 deleted the issue-1958-fix-door-sector-reset branch November 27, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TR1 TR2 TRX bug A bug with TRX
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

TR2X bug: invisible collision in Catacombs
3 participants