From b096c7a82fc0f02726b5965dcf321915f216d371 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 15 Mar 2013 21:41:01 +0000 Subject: [PATCH] - Fixed: changemap allowed changing the map in "demo mode." - Fixed: Crash when using the console at the title screen. SVN r4182 (trunk) --- src/c_cmds.cpp | 2 +- src/s_sound.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index f6bd01a20..87f63ead4 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -329,7 +329,7 @@ CCMD (hxvisit) CCMD (changemap) { - if (who == NULL) + if (who == NULL || !usergame) { Printf ("Use the map command when not in a game.\n"); return; diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 175ea7749..3da346bf3 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -448,7 +448,7 @@ void S_Start () // Don't start the music if loading a savegame, because the music is stored there. // Don't start the music if revisiting a level in a hub for the same reason. - if (!savegamerestore && (level.info->snapshot == NULL || !level.info->isValid())) + if (!savegamerestore && (level.info == NULL || level.info->snapshot == NULL || !level.info->isValid())) { if (level.cdtrack == 0 || !S_ChangeCDMusic (level.cdtrack, level.cdid)) S_ChangeMusic (level.Music, level.musicorder);