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

Prevent music triggers from playing again after loading a save file #371

Closed
aredfan opened this issue Jan 22, 2022 · 6 comments · Fixed by #905
Closed

Prevent music triggers from playing again after loading a save file #371

aredfan opened this issue Jan 22, 2022 · 6 comments · Fixed by #905
Assignees
Labels
OG bug A bug in original game TR1
Milestone

Comments

@aredfan
Copy link
Collaborator

aredfan commented Jan 22, 2022

I've noticed that music triggers can play more than once, it goes like this:

  1. Lara steps on a trigger, music plays.
  2. The player creates a save file afterwards.
  3. The player loads the save file.
  4. If Lara treads on the same trigger again, the music plays again.

This is noticable in areas where Lara have to do backtracking.

@rr-
Copy link
Collaborator

rr- commented Jan 22, 2022

This error cannot be fully fixed. It also manifests in a slightly different form:

  1. Lara steps on a tile triggering music track A.
  2. Lara goes elsewhere and steps on a tile triggering music track B (this includes collecting a secret, for instance).
  3. Lara goes back to the first tile. The game shouldn't play the music track again, but it does.

The reason for this is because the game remembers which track was played recently and even if the author of the level forgot to mark given trigger as one-shot, this logic ensures that we do not play the same music track twice in a row.

To fix this, we have two solutions: the first is to find every broken trigger in each level and mark it as a one-shot. Not very sustainable or elegant in my opinion. A second, more sensible approach would be to add to the save file information about what track was last played, letting the in-game protection against playing the same track twice in a row continue doing its job even after save and reload. This of course needs #277 as everything that has to do with saves.

@rr- rr- added the OG bug A bug in original game label Jan 22, 2022
@rr- rr- added this to the 2.6 milestone Feb 8, 2022
@walkawayy walkawayy self-assigned this Feb 8, 2022
@walkawayy
Copy link
Collaborator

walkawayy commented Feb 11, 2022

@rr- maybe marking every trigger as one shot is now possible? We already traverse them all to do stat calculation. Let me know what you think.

@rr-
Copy link
Collaborator

rr- commented Feb 11, 2022

I haven't thought about this. Won't this lead to regressions?

@walkawayy
Copy link
Collaborator

How so? Aren't all music triggers supposed to be played only once?

@rr-
Copy link
Collaborator

rr- commented Feb 11, 2022

Custom levels with Lara saying "I should revisit this area later" before a flip?

@Richard-L
Copy link
Collaborator

For custom levels, could people just create two triggers in the same place, to be used up in concession of game progression?

@rr- rr- removed this from the 2.6 milestone Feb 16, 2022
@walkawayy walkawayy removed their assignment May 27, 2022
@walkawayy walkawayy self-assigned this Jul 28, 2023
@walkawayy walkawayy added this to the 2.16 milestone Jul 28, 2023
@walkawayy walkawayy changed the title Feature request: Prevent music triggers from playing again after loading a save file Prevent music triggers from playing again after loading a save file Jul 28, 2023
walkawayy added a commit to walkawayy/TRX that referenced this issue Aug 4, 2023
walkawayy added a commit to walkawayy/TRX that referenced this issue Aug 11, 2023
walkawayy added a commit to walkawayy/TRX that referenced this issue Aug 12, 2023
@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
None yet
Development

Successfully merging a pull request may close this issue.

4 participants