Skip to content

Commit

Permalink
tr1/inv-ring: fix resuming paused music
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Jan 7, 2025
1 parent bd7deec commit 4aa26ca
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/tr1/game/inventory_ring/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,13 @@ static GAME_FLOW_COMMAND M_Control(INV_RING *const ring)
}

if (ring->motion.status == RNG_DONE) {
return M_Finish(ring);
const GAME_FLOW_COMMAND gf_cmd = M_Finish(ring);
// Returning to game – resume music
if (gf_cmd.action == GF_NOOP) {
Music_Unpause();
Sound_UnpauseAll();
}
return gf_cmd;
}

InvRing_CalcAdders(ring, INV_RING_ROTATE_DURATION);
Expand Down Expand Up @@ -949,11 +955,6 @@ void InvRing_Close(INV_RING *const ring)
g_OldInputDB = (INPUT_STATE) { 0 };
}

if (ring->mode != INV_TITLE_MODE) {
Music_Unpause();
Sound_UnpauseAll();
}

g_GameInfo.inv_ring_shown = false;
m_InvChosen = NO_OBJECT;
Memory_Free(ring);
Expand Down

0 comments on commit 4aa26ca

Please sign in to comment.