From d56b1d05d6ae3345c634c8b958a1f04014695b8a Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 29 Dec 2022 20:59:19 +1100 Subject: [PATCH] - SW: Restore two original cheat codes lost long ago. * Fixes #810. --- source/games/sw/src/cheats.cpp | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/source/games/sw/src/cheats.cpp b/source/games/sw/src/cheats.cpp index 74da6cf39..83c00e281 100644 --- a/source/games/sw/src/cheats.cpp +++ b/source/games/sw/src/cheats.cpp @@ -185,6 +185,40 @@ bool WarpCheat(cheatseq_t* c) // //--------------------------------------------------------------------------- +EXTERN_CVAR(Bool, Pachinko_Win_Cheat) + +bool WinPachinkoCheat(cheatseq_t* c) +{ + if (CommEnabled) + return false; + + Pachinko_Win_Cheat = !Pachinko_Win_Cheat; + PutStringInfo(&Player[myconnectindex], GStrings(Pachinko_Win_Cheat ? "TXTS_WINPACHINKOEN" : "TXTS_WINPACHINKODIS")); + return true; +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + +bool BunnyCheat(cheatseq_t* c) +{ + if (CommEnabled) + return false; + + sw_bunnyrockets = !sw_bunnyrockets; + PutStringInfo(&Player[myconnectindex], GStrings(Pachinko_Win_Cheat ? "TXTS_BUNNYENABLED" : "TXTS_BUNNYDISABLED")); + return true; +} + +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + bool EveryCheatToggle(cheatseq_t* c) { EveryCheat = !EveryCheat; @@ -212,6 +246,8 @@ static cheatseq_t swcheats[] = { {"lwloc", "stat coord", nullptr, true}, {"lwmap", nullptr, MapCheat, 0}, {"lwroom", nullptr, RoomCheat, true}, // Room above room debug + {"lwtrix", nullptr, BunnyCheat, true}, // Bunny rockets cheat + {"winpachinko",nullptr, WinPachinkoCheat, true}, }; //---------------------------------------------------------------------------