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

room: test sector range for Torso boss #1497

Merged

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Sep 7, 2024

Resolves #1236.

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

This provides an option to test a range of sectors around the one on which a large and heavy item dies. It ultimately resolves the potential softlock when killing Torso boss in Great Pyramid. For custom levels, it should be switched off in the gameflow as builders have full control of FD design (although it may have some uses, the freedom is there of course).

The only other solution to the softlock that I could see would involve item injection (a hidden boulder somewhere to trigger the camera/egg/music at the start) but this would break existing and TombATI saves, and I couldn't think of a way around that problem.

Other heavy trigger activators aren't affected here as they're all less than the 1.5 tile limit introduced here.

Just for testing - getting Adam to actually end up on the problematic tile is time-consuming, so attached is an exe that forces him here on death.
TR1X.zip

@lahm86 lahm86 added OG bug A bug in original game Priority: medium labels Sep 7, 2024
@lahm86 lahm86 added this to the 4.4 milestone Sep 7, 2024
@lahm86 lahm86 self-assigned this Sep 7, 2024
@lahm86 lahm86 requested review from a team as code owners September 7, 2024 10:14
@lahm86 lahm86 requested review from rr- and walkawayy and removed request for a team September 7, 2024 10:14
@lahm86 lahm86 force-pushed the issue-1236-extend-trigger-test branch from 6a5af96 to cfc1448 Compare September 7, 2024 10:17
src/game/room.c Outdated
Room_GetSector(item->pos.x, MAX_HEIGHT, item->pos.z, &room_num);

Room_TestSectorTrigger(item, sector);
if (item->object_id == O_LARA || !g_GameFlow.use_extended_triggers) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks. Is the torso boss the only enemy for which this criterion is true? If so, we could just hardcode it to always trigger this behavior for it only, and skip the gameflow changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, good point. That'll be cleaner, I'll sort that out.

This provides an option to test a range of sectors around the one on
which a large and heavy item dies. It ultimately resolves the potential
softlock when killing Torso boss in Great Pyramid.

Resolves LostArtefacts#1236.
@lahm86 lahm86 force-pushed the issue-1236-extend-trigger-test branch from cfc1448 to 77dd140 Compare September 7, 2024 10:41
@lahm86 lahm86 changed the title room: test sector range for large triggerers room: test sector range for Torso boss Sep 7, 2024
@lahm86 lahm86 requested a review from rr- September 7, 2024 10:44
@aredfan
Copy link
Collaborator

aredfan commented Sep 7, 2024

I was able to lure the torso boss onto the starting trigger. This fix checks out. 👍

@lahm86 lahm86 merged commit c4de1a2 into LostArtefacts:develop Sep 7, 2024
5 checks passed
@lahm86 lahm86 deleted the issue-1236-extend-trigger-test branch September 7, 2024 14:28
@rr- rr- added the TR1 label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OG bug A bug in original game TR1
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

OG bug: Torso death can lead to a softlock
3 participants