- enable fly cheat for shadow warrior. in other games it is currently ignored, but I think Redneck Rampage and Blood both need it at some point too

This commit is contained in:
Rachael Alexanderson 2020-09-24 21:26:28 -04:00 committed by Christoph Oelckers
parent ce269808dc
commit 410d392ba8
4 changed files with 28 additions and 12 deletions

View file

@ -114,6 +114,21 @@ void genericCheat(int player, uint8_t** stream, bool skip)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
CCMD(fly)
{
if (!CheckCheatmode(true, true))
{
Net_WriteByte(DEM_GENERICCHEAT);
Net_WriteByte(CHT_FLY);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
CCMD(god) CCMD(god)
{ {
if (!CheckCheatmode(true, true)) // Right now the god cheat is a global setting in some games and not a player property. This should be changed. if (!CheckCheatmode(true, true)) // Right now the god cheat is a global setting in some games and not a player property. This should be changed.

View file

@ -121,6 +121,9 @@ enum ECheat
CHT_KFC, CHT_KFC,
CHT_MONSTERS, CHT_MONSTERS,
// Shadow Warrior
CHT_FLY,
// Blood // Blood
kCheatSatchel, kCheatSatchel,
kCheatKevorkian, kCheatKevorkian,

View file

@ -49,6 +49,7 @@ bool CheatInputMode = false;
bool EveryCheat = false; bool EveryCheat = false;
bool mapcheat = false; bool mapcheat = false;
extern bool FAF_DebugView; extern bool FAF_DebugView;
extern bool ToggleFlyMode;
const char *CheatKeyType; const char *CheatKeyType;
void KeysCheat(PLAYERp pp, const char *cheat_string); void KeysCheat(PLAYERp pp, const char *cheat_string);
@ -88,6 +89,10 @@ const char *GameInterface::GenericCheat(int player, int cheat)
Player[player].Flags ^= PF_CLIP_CHEAT; Player[player].Flags ^= PF_CLIP_CHEAT;
return GStrings(Player[player].Flags & PF_CLIP_CHEAT ? "CLIPPING: OFF" : "CLIPPING: ON"); return GStrings(Player[player].Flags & PF_CLIP_CHEAT ? "CLIPPING: OFF" : "CLIPPING: ON");
case CHT_FLY:
ToggleFlyMode = true;
return nullptr;
default: default:
return nullptr; return nullptr;
} }

View file

@ -118,6 +118,8 @@ extern int FinishAnim;
char PlayerGravity = PLAYER_JUMP_GRAV; char PlayerGravity = PLAYER_JUMP_GRAV;
#endif #endif
bool ToggleFlyMode = false;
extern bool DebugOperate; extern bool DebugOperate;
//unsigned char synctics, lastsynctics; //unsigned char synctics, lastsynctics;
@ -3711,19 +3713,10 @@ DoPlayerWadeSuperJump(PLAYERp pp)
bool PlayerFlyKey(void) bool PlayerFlyKey(void)
{ {
bool key = false; if (!ToggleFlyMode)
if (!GodMode)
return false; return false;
ToggleFlyMode = false;
#if 0 return true;
// Cheat or not, this simply won't do.
key = inputState.GetKeyStatus(KEYSC_J);
if (key)
inputState.ClearKeyStatus(KEYSC_J);
#endif
return key;
} }
void void