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

TR1X bug: environment BGM is not saved #1769

Closed
rr- opened this issue Oct 28, 2024 · 0 comments · Fixed by #1815
Closed

TR1X bug: environment BGM is not saved #1769

rr- opened this issue Oct 28, 2024 · 0 comments · Fixed by #1815
Assignees
Labels
TR1 TRX bug A bug with TRX

Comments

@rr-
Copy link
Collaborator

rr- commented Oct 28, 2024

I'm not sure if it's a bug or a feature, but the fix is simple:

diff --git a/src/tr1/game/savegame/savegame_bson.c b/src/tr1/game/savegame/savegame_bson.c
index bc06d1f3..36572229 100644
--- a/src/tr1/game/savegame/savegame_bson.c
+++ b/src/tr1/game/savegame/savegame_bson.c
@@ -1248,7 +1248,7 @@ static JSON_OBJECT *M_DumpCurrentMusic(void)
 {
     JSON_OBJECT *current_music_obj = JSON_ObjectNew();
     JSON_ObjectAppendInt(
-        current_music_obj, "current_track", Music_GetCurrentTrack());
+        current_music_obj, "current_track", Music_GetCurrentPlayingTrack());
     JSON_ObjectAppendDouble(
         current_music_obj, "timestamp", Music_GetTimestamp());
 
@rr- rr- added TRX bug A bug with TRX TR1 labels Oct 28, 2024
@rr- rr- self-assigned this Oct 28, 2024
@rr- rr- moved this to Ready in TRX Dev tracker Oct 28, 2024
@rr- rr- removed their assignment Nov 1, 2024
@lahm86 lahm86 self-assigned this Nov 2, 2024
@lahm86 lahm86 moved this from Ready to In progress in TRX Dev tracker Nov 2, 2024
lahm86 added a commit to lahm86/TRX that referenced this issue Nov 2, 2024
This will save the current music track and a flag to indicate whether
or not it's looped, so that on load, the correct start-up for it is
applied.

Resolves LostArtefacts#1769.
@lahm86 lahm86 moved this from In progress to In review in TRX Dev tracker Nov 2, 2024
lahm86 added a commit to lahm86/TRX that referenced this issue Nov 3, 2024
This will save the current music track and a flag to indicate whether
or not it's looped, so that on load, the correct start-up for it is
applied. This also changes the related config option from a bool to an
enum with options for never, not-ambient, and always.

Resolves LostArtefacts#1769.
lahm86 added a commit to lahm86/TRX that referenced this issue Nov 3, 2024
This will save the current music track and a flag to indicate whether
or not it's looped, so that on load, the correct start-up for it is
applied. This also changes the related config option from a bool to an
enum with options for never, non-ambient, and always.

Resolves LostArtefacts#1769.
lahm86 added a commit that referenced this issue Nov 3, 2024
This will save the current music track and a flag to indicate whether
or not it's looped, so that on load, the correct start-up for it is
applied. This also changes the related config option from a bool to an
enum with options for never, non-ambient, and always.

Resolves #1769.
@github-project-automation github-project-automation bot moved this from In review to Done in TRX Dev tracker Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TR1 TRX bug A bug with TRX
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants