diff --git a/source/blood/src/endgame.cpp b/source/blood/src/endgame.cpp index 37f0ea78f..4a62ce0c2 100644 --- a/source/blood/src/endgame.cpp +++ b/source/blood/src/endgame.cpp @@ -167,6 +167,7 @@ void GameInterface::LevelCompleted(MapRecord *map, int skill) { JobDesc job = { Create() }; sndStartSample(268, 128, -1, false, CHANF_UI); + Mus_Stop(); RunScreenJob(&job, 1, [=](bool) { soundEngine->StopAllChannels(); diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 24382d7be..20949aace 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -163,7 +163,6 @@ static void GameTicker() case ga_completed: FX_StopAllSounds(); FX_SetReverb(0); - Mus_Stop(); if (g_nextmap == currentLevel) { // if the same level is restarted, skip any progression stuff like summary screens or cutscenes. diff --git a/source/core/version.h b/source/core/version.h index 047a3ee31..c182da35a 100644 --- a/source/core/version.h +++ b/source/core/version.h @@ -41,7 +41,7 @@ const char *GetVersionString(); /** Lots of different version numbers **/ -#define VERSIONSTR "0.7.0 alpha" +#define VERSIONSTR "0.7.1 alpha" // The version as seen in the Windows resource #define RC_FILEVERSION 0,7,0,0 diff --git a/source/exhumed/src/gameloop.cpp b/source/exhumed/src/gameloop.cpp index 8f87432e1..8d6c8d08c 100644 --- a/source/exhumed/src/gameloop.cpp +++ b/source/exhumed/src/gameloop.cpp @@ -47,6 +47,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "core/menu/menu.h" #include "d_net.h" #include "automap.h" +#include "raze_music.h" BEGIN_PS_NS @@ -221,7 +222,8 @@ void GameInterface::NewGame(MapRecord *map, int skill) void GameInterface::LevelCompleted(MapRecord *map, int skill) { - if (currentLevel->levelNumber == 0) gameaction = ga_mainmenu; + Mus_Stop(); + if (currentLevel->levelNumber == 0) gameaction = ga_mainmenu; else Intermission(currentLevel, map); } diff --git a/source/games/duke/src/2d_d.cpp b/source/games/duke/src/2d_d.cpp index 0efe5862f..e408df841 100644 --- a/source/games/duke/src/2d_d.cpp +++ b/source/games/duke/src/2d_d.cpp @@ -329,7 +329,8 @@ public: 260, 290,VICTORY1 + 5,86,59, 290, 320,VICTORY1 + 6,86,59, 320, 350,VICTORY1 + 7,86,59, - 350, 380,VICTORY1 + 8,86,59 + 350, 380,VICTORY1 + 8,86,59, + 350, 380,VICTORY1 + 8,86,59, }; auto translation = TRANSLATION(Translation_BasePalettes, ENDINGPAL); @@ -612,15 +613,17 @@ static void bonussequence_d(int num, JobDesc *jobs, int &job) { case 0: jobs[job++] = { Create(), nullptr }; - jobs[job++] = { Create(E1ENDSCREEN, DScreenJob::fadein|DScreenJob::fadeout, 0x7fffffff), nullptr }; + jobs[job++] = { Create(E1ENDSCREEN, DScreenJob::fadein|DScreenJob::fadeout, 0x7fffffff), []() { Mus_Stop(); } }; break; case 1: + Mus_Stop(); jobs[job++] = { PlayVideo("cineov2.anm", cineov2sound, framespeed_18), []() { S_PlaySound(PIPEBOMB_EXPLODE, CHAN_AUTO, CHANF_UI); } }; jobs[job++] = { Create(E2ENDSCREEN, DScreenJob::fadein | DScreenJob::fadeout, 0x7fffffff), []() { FX_StopAllSounds(); } }; break; case 2: + Mus_Stop(); if (g_gameType & GAMEFLAG_DUKEDC) { jobs[job++] = { PlayVideo("radlogo.anm", dukedcsound, framespeed_10), nullptr }; @@ -636,6 +639,7 @@ static void bonussequence_d(int num, JobDesc *jobs, int &job) break; case 3: + Mus_Stop(); jobs[job++] = { PlayVideo("vol4e1.anm", vol4e1, framespeed_10), nullptr }; jobs[job++] = { PlayVideo("vol4e2.anm", vol4e2, framespeed_10), nullptr }; jobs[job++] = { PlayVideo("vol4e3.anm", vol4e3, framespeed_10), []() { S_PlaySound(ENDSEQVOL3SND4, CHAN_AUTO, CHANF_UI); } }; @@ -645,6 +649,7 @@ static void bonussequence_d(int num, JobDesc *jobs, int &job) break; case 4: + Mus_Stop(); jobs[job++] = { Create(), []() { FX_StopAllSounds(); } }; break; } @@ -1001,12 +1006,13 @@ void dobonus_d(int bonusonly, const CompletionFunc& completion) int job = 0; FX_StopAllSounds(); - Mus_Stop(); if (bonusonly < 0 && numplayers < 2 && ud.from_bonus == 0) { bonussequence_d(volfromlevelnum(currentLevel->levelNumber), jobs, job); } + else + Mus_Stop(); if (playerswhenstarted > 1 && ud.coop != 1) { diff --git a/source/games/duke/src/cheats.cpp b/source/games/duke/src/cheats.cpp index e3839dcbd..376b76aec 100644 --- a/source/games/duke/src/cheats.cpp +++ b/source/games/duke/src/cheats.cpp @@ -286,7 +286,6 @@ static bool cheatItems(int player) static bool cheatLevel(cheatseq_t *s) { - // Fixme: This should be broadcast as a net event once things are up again. lastlevel = 0; int volnume,levnume; volnume = s->Args[0] - '0' - 1; diff --git a/source/games/duke/src/hudweapon_d.cpp b/source/games/duke/src/hudweapon_d.cpp index 6105d15da..bfd4627dc 100644 --- a/source/games/duke/src/hudweapon_d.cpp +++ b/source/games/duke/src/hudweapon_d.cpp @@ -828,21 +828,10 @@ void displayweapon_d(int snum, double smoothratio) if (*kb == 2) l -= 3; { - double x, y; - short tilenum; - signed char shade; - char orientation; - x = (l - look_anghalf); - y = (looking_arc + 244 - gun_pos); - tilenum = FIRSTGUN + kb_frames[*kb]; - shade = gs; - orientation = 2; - - hud_drawpal( - x, - y, - tilenum, + (l - look_anghalf), + (looking_arc + 244 - gun_pos), + FIRSTGUN + kb_frames[*kb], gs, 2, pal); } } @@ -865,30 +854,18 @@ void displayweapon_d(int snum, double smoothratio) hud_drawpal(124 + (kickback_pic * 2.) - look_anghalf, looking_arc + 430 - gun_pos - (kickback_pic * 8.), FIRSTGUN + 6, gs, o | pin, pal); hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, gs, o | pin, pal); } - else if (*kb < (reload_time - 12)) + else if (*kb < (isNamWW2GI()? (reload_time - 12) : 23)) { hud_drawpal(184 - look_anghalf, looking_arc + 235 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal); hud_drawpal(224 - look_anghalf, looking_arc + 210 - gun_pos, pic_5, gs, o | pin, pal); } - else if (*kb < (reload_time - 6)) + else if (*kb < (isNamWW2GI()? (reload_time - 6) : 25)) { hud_drawpal(164 - look_anghalf, looking_arc + 245 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal); hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, gs, o | pin, pal); } - else if (*kb < (reload_time)) + else if (*kb < (isNamWW2GI()? reload_time : 27)) hud_drawpal(194 - look_anghalf, looking_arc + 235 - gun_pos, pic_5, gs, o, pal); - else if (*kb < 23) - { - hud_drawpal(184 - look_anghalf, looking_arc + 235 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal); - hud_drawpal(224 - look_anghalf, looking_arc + 210 - gun_pos, pic_5, gs, o | pin, pal); - } - else if (*kb < 25) - { - hud_drawpal(164 - look_anghalf, looking_arc + 245 - gun_pos, FIRSTGUN + 8, gs, o | pin, pal); - hud_drawpal(224 - look_anghalf, looking_arc + 220 - gun_pos, pic_5, gs, o | pin, pal); - } - else if (*kb < 27) - hud_drawpal(194 - look_anghalf, looking_arc + 235 - gun_pos, pic_5, gs, o | pin, pal); } }; diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index ad93cd2dd..06a0609be 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -1078,6 +1078,7 @@ void exitlevel(MapRecord *nextlevel) // Clear potentially loaded per-map ART only after the bonus screens. artClearMapArt(); gameaction = ga_level; + ud.eog = false; if (endofgame) { if (ud.multimode < 2)