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

Music playing state not changing with WinLevelInstant or Restart Mission #52

Open
1 of 3 tasks
trigger-segfault opened this issue Aug 30, 2022 · 1 comment
Open
1 of 3 tasks
Labels
audio Relates to playing sound effects, music, and movies. original bug This was an issue in the original game already. partially solved The issue is solved, but not in its entirety.

Comments

@trigger-segfault
Copy link
Owner

trigger-segfault commented Aug 30, 2022

Describe the issue
When using the Debug_WinLevelInstant shortcut (LCtrl+LShift+L), the music is not stopped, and proceeds to continue while in the front end.

When pressing Restart Mission from the options menu, the music also does not stop, and continues to play during the the intro video and briefing.

Expected behaviour
Music is only intended to play when in a level, when not showing an objective message (briefing, missing complete/failed). Even though Debug_WinLevelInstant is a debug shortcut, the game should still function as expected.

The Restart Mission music issue is slightly different, in that you could argue it sounds better to keep the current track playing even during the restarted second briefing. The same goes for music playing when pressing the Replay Objective button.

Steps to reproduce (A)

  1. Open up a level.
  2. Enable DebugComplete / AllowDebugKeys.
  3. Press the Debug_WinLevelInstant shortcut (LCtrl+LShift+L).
  4. Music should continue to play while in the rewards screen and the rest of the front end.

Steps to reproduce (B)

  1. Open up a level.
  2. Open up the options menu.
  3. Press Restart Mission (or Replay Objective).
  4. Music should continue to play during the intro video and while briefing before starting the mission.

Additional information

  • Time played this session: 3 minutes.
  • Level: Driller Night!
  • Game speed: 100%
  • Graphics fix: dgVoodoo 2.55.4
  • Using mods: None

Steps to fix

  • WinLevelInstant
  • Restart Mission
  • Replay Objective

Possible solution (A)
Simply updating the music playing state in Lego_EndLevel (like is present in Objective_Update) should suffice.

Possible solution (B)
To fix the Restart Mission issue, update the music playing state in Level_Free.

To fix the issue with Replay Objective, the music playing state should be updated when calling Objective_SetStatus.

@trigger-segfault trigger-segfault added game data bug Misbehavior on interaction with wad files or game assets. audio Relates to playing sound effects, music, and movies. original bug This was an issue in the original game already. and removed game data bug Misbehavior on interaction with wad files or game assets. labels Aug 30, 2022
trigger-segfault added a commit that referenced this issue Aug 30, 2022
* Implement a few Objective module functions.
* Implement all(?) audio-related Game module functions.
* Research more level/objective-related function names.
* Rename game MUSIC flags to better-match what they are doing (now `GAME1_MUSICPLAYING` and `GAME2_MUSICREADY`).
* Renamed function Lego_Is/SetMusicOn to Lego_Is/SetMusicPlaying. NOTE that new Lego_Is/SetMusicOn functions exist to handle if music is enabled at all. These are now used by settings changers.
* Replace most usage of `Lego_SetMusicPlaying` with a new function `Lego_ChangeMusicPlaying`, which is a wrapper around `Lego_SetMusicPlaying` that automatically handles the `GAME2_MUSICREADY` flag.
* Change teleporter module to use `LegoObject_TypeFlags` instead of `TeleportObjectType` flags.
* Add combined flags `OBJECT_TYPE_FLAGS_TELEPORTED` for a combination of all units that use the teleporter.
* Fix music still playing when instantly exiting a level.
* Meanwhile, music playing during Replay Objective and Restart Mission has been left as-is. For now it seems better to leave it that way.
@trigger-segfault
Copy link
Owner Author

This issue has been partially addressed by e818781. The debug key should now properly end music playback.

But playback is currently preserved for Restart Mission and Replay Objective, where it seems at least slightly more fitting.

@trigger-segfault trigger-segfault added the partially solved The issue is solved, but not in its entirety. label Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Relates to playing sound effects, music, and movies. original bug This was an issue in the original game already. partially solved The issue is solved, but not in its entirety.
Projects
None yet
Development

No branches or pull requests

1 participant