diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 55eb9853a..62fb92943 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,9 @@ September 1, 2008 (Changes by Graf Zahl) +- Added an 'allcheats' CVAR. This will enable all cheats from all + supported games in any game being played. +- Changed Chex Quest DoomEdNum initilization so that all empty slots + are filled with Doom actors if they exist. +- Added missing spawn filters to Chex Quest items. - Gave the PlayerPawn base class a default damage fade color instead of hacking it into the actor when actually used. - Fixed: The DamageFade color was not saved in savegames. diff --git a/src/info.cpp b/src/info.cpp index cd4c294f4..c81a96d1e 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -251,6 +251,12 @@ void FActorInfo::RegisterIDs () DoomEdMap.AddType (DoomEdNum, Class); } } + // Fill out the list for Chex Quest with Doom's actors + if (gameinfo.gametype == GAME_Chex && DoomEdMap.FindType(DoomEdNum) == NULL && + (GameFilter & GAME_Doom)) + { + DoomEdMap.AddType (DoomEdNum, Class); + } } //========================================================================== diff --git a/src/st_stuff.cpp b/src/st_stuff.cpp index 452718e04..f106fd2ca 100644 --- a/src/st_stuff.cpp +++ b/src/st_stuff.cpp @@ -42,6 +42,7 @@ struct cheatseq_t bool (*Handler)(cheatseq_t *); }; +static bool CheatCheckList (event_t *ev, cheatseq_t *cheats, int numcheats); static bool CheatAddKey (cheatseq_t *cheat, BYTE key, bool *eat); static bool Cht_Generic (cheatseq_t *); static bool Cht_Music (cheatseq_t *); @@ -169,6 +170,8 @@ static BYTE CheatLeeSnyder[] = { 'l','e','e','s','n','y','d','e','r',0,0,255 }; static BYTE CheatKimHyers[] = { 'k','i','m','h','y','e','r','s',255 }; static BYTE CheatShrrill[] = { 's','h','r','r','i','l','l',255 }; +static BYTE CheatTNTem[] = { 't','n','t','e','m',255 }; + static cheatseq_t DoomCheats[] = { { CheatMus, 0, 1, 0, {0,0}, Cht_Music }, @@ -281,19 +284,26 @@ static cheatseq_t ChexCheats[] = { CheatLeeSnyder, 0, 0, 0, {0,0}, Cht_ChangeLevel } }; +static cheatseq_t SpecialCheats[] = +{ + { CheatTNTem, 0, 0, 0, {CHT_MASSACRE,0}, Cht_Generic } +}; + + extern bool CheckCheatmode (); +CVAR(Bool, allcheats, false, CVAR_ARCHIVE) + // Respond to keyboard input events, intercept cheats. // [RH] Cheats eat the last keypress used to trigger them bool ST_Responder (event_t *ev) { bool eat = false; - if (ev->type == EV_KeyDown) + if (!allcheats) { cheatseq_t *cheats; int numcheats; - int i; switch (gameinfo.gametype) { @@ -325,6 +335,29 @@ bool ST_Responder (event_t *ev) default: return false; } + return CheatCheckList(ev, cheats, numcheats); + } + else + { + static cheatseq_t *cheatlists[] = { DoomCheats, HereticCheats, HexenCheats, StrifeCheats, ChexCheats, SpecialCheats }; + static int counts[] = { countof(DoomCheats), countof(HereticCheats), countof(HexenCheats), + countof(StrifeCheats), countof(ChexCheats), countof(SpecialCheats) }; + + for (int i=0; itype == EV_KeyDown) + { + int i; for (i = 0; i < numcheats; i++, cheats++) { diff --git a/wadsrc/static/actors/chex/chexweapons.txt b/wadsrc/static/actors/chex/chexweapons.txt index dde9fd9e0..09e1e55ec 100644 --- a/wadsrc/static/actors/chex/chexweapons.txt +++ b/wadsrc/static/actors/chex/chexweapons.txt @@ -2,16 +2,19 @@ actor Bootspoon : Fist { + game Chex obituary "" } actor SuperBootspork : Chainsaw 2005 { + game Chex obituary "" } actor MiniZorcher : Pistol { + game Chex obituary "" inventory.pickupmessage "$GOTMINIZORCHER" states