From 1225071f781d5d97b13fc93711ba00d136b83444 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 9 Dec 2007 02:27:02 +0000 Subject: [PATCH] - Fixed: Skill level confirmation only worked with Doom. Also fixed parsing of MustConfirm: It looked for TK_String when it should have used TK_StringConst. - Fixed: When travelling to a new non-hub map, any items being carried with amounts of 0 would be upped to 1. SVN r589 (trunk) --- docs/rh-log.txt | 4 ++++ src/g_game.cpp | 4 +++- src/g_level.cpp | 4 +--- src/m_menu.cpp | 2 +- wadsrc/mapinfo/heretic.txt | 1 - wadsrc/mapinfo/hexen.txt | 1 - wadsrc/mapinfo/strife.txt | 1 - wadsrc/wadsrc.vcproj | 4 ++++ 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 588a3dc8ab..fadc85964a 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,8 @@ December 8, 2007 +- Fixed: Skill level confirmation only worked with Doom. Also fixed parsing + of MustConfirm: It looked for TK_String when it should have used TK_StringConst. +- Fixed: When travelling to a new non-hub map, any items being carried with + amounts of 0 would be upped to 1. - Fixed: When the game starts with the net pane open, the abort button receives the input focus. When the pane is closed, the focus doesn't return to any window, so even though the window is still active, it no diff --git a/src/g_game.cpp b/src/g_game.cpp index 9539ebc185..8d2cf40833 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -1108,7 +1108,9 @@ void G_PlayerFinishLevel (int player, EFinishLevelType mode, bool resetinventory { // Reduce all owned (visible) inventory to 1 item each for (item = p->mo->Inventory; item != NULL; item = item->Inventory) { - if (item->ItemFlags & IF_INVBAR) + // There may be depletable items with an amount of 0. + // Those need to stay at 0; the rest get dropped to 1. + if (item->ItemFlags & IF_INVBAR && item->Amount > 1) { item->Amount = 1; } diff --git a/src/g_level.cpp b/src/g_level.cpp index afe3eb5a22..7e11d481a4 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -3144,12 +3144,10 @@ static void ParseSkill () else if (SC_Compare("MustConfirm")) { skill.MustConfirm = true; - /* - if (SC_CheckToken(TK_String)) + if (SC_CheckToken(TK_StringConst)) { skill.MustConfirmText = sc_String; } - */ } else if (SC_Compare("Key")) { diff --git a/src/m_menu.cpp b/src/m_menu.cpp index 4083945179..623d66f154 100644 --- a/src/m_menu.cpp +++ b/src/m_menu.cpp @@ -1739,7 +1739,7 @@ void M_VerifyNightmare (int ch) void M_ChooseSkill (int choice) { - if (gameinfo.gametype == GAME_Doom && AllSkills[choice].MustConfirm) + if (AllSkills[choice].MustConfirm) { const char *msg = AllSkills[choice].MustConfirmText; if (*msg==0) msg = GStrings("NIGHTMARE"); diff --git a/wadsrc/mapinfo/heretic.txt b/wadsrc/mapinfo/heretic.txt index 2ceeaef82e..bd9b14e6ae 100644 --- a/wadsrc/mapinfo/heretic.txt +++ b/wadsrc/mapinfo/heretic.txt @@ -25,7 +25,6 @@ skill nightmare DisableCheats SpawnFilter "Hard" Name "MNU_BLACKPLAGUE" - MustConfirm diff --git a/wadsrc/mapinfo/hexen.txt b/wadsrc/mapinfo/hexen.txt index d106e9eb93..563444d9cc 100644 --- a/wadsrc/mapinfo/hexen.txt +++ b/wadsrc/mapinfo/hexen.txt @@ -42,7 +42,6 @@ skill nightmare PlayerClassName "fighter" "MNU_TITAN" PlayerClassName "cleric" "MNU_POPE" PlayerClassName "mage" "MNU_ARCHMAGE" - MustConfirm clusterdef 1 diff --git a/wadsrc/mapinfo/strife.txt b/wadsrc/mapinfo/strife.txt index fa98e667ba..091f453124 100644 --- a/wadsrc/mapinfo/strife.txt +++ b/wadsrc/mapinfo/strife.txt @@ -30,7 +30,6 @@ skill nightmare RespawnTime 16 SpawnFilter "Hard" PicName "M_NMARE" - MustConfirm Key b defaultmap diff --git a/wadsrc/wadsrc.vcproj b/wadsrc/wadsrc.vcproj index 0c220a087c..e3fd08afd2 100644 --- a/wadsrc/wadsrc.vcproj +++ b/wadsrc/wadsrc.vcproj @@ -320,6 +320,10 @@ RelativePath=".\mapinfo\doom2.txt" > + +