From 6beaf818e37a6fcb09f8e1f5167f236e0016516c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 25 Dec 2009 00:41:15 +0000 Subject: [PATCH] - Fixed: Calling S_ChangeMusic() with the same song but a different looping flag now restarts the song so that the new looping setting can be applied. (This was easier than modifying every music handler to support modifying loop changes on the fly, which seems like overkill.) SVN r2041 (trunk) --- docs/rh-log.txt | 4 ++++ src/s_sound.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 758459ef0..bd6e9ca3e 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,8 @@ December 24, 2009 +- Fixed: Calling S_ChangeMusic() with the same song but a different looping + flag now restarts the song so that the new looping setting can be applied. + (This was easier than modifying every music handler to support modifying + loop changes on the fly, which seems like overkill.) - Fixed: savepatchsize was declared incorrectly in d_dehacked.cpp:DoInclude(). - Changed AFastProjectile::Effect() so that it sets the spawned trail to face same direction as the projectile. diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 4fbef6ae1..d63bd60e0 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -2306,7 +2306,9 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force) } } - if (!mus_playing.name.IsEmpty() && stricmp (mus_playing.name, musicname) == 0) + if (!mus_playing.name.IsEmpty() && + stricmp (mus_playing.name, musicname) == 0 && + mus_playing.handle->m_Looping == looping) { if (order != mus_playing.baseorder) {