mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- 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:
parent
ce269808dc
commit
410d392ba8
4 changed files with 28 additions and 12 deletions
|
@ -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)
|
||||
{
|
||||
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.
|
||||
|
|
|
@ -121,6 +121,9 @@ enum ECheat
|
|||
CHT_KFC,
|
||||
CHT_MONSTERS,
|
||||
|
||||
// Shadow Warrior
|
||||
CHT_FLY,
|
||||
|
||||
// Blood
|
||||
kCheatSatchel,
|
||||
kCheatKevorkian,
|
||||
|
|
|
@ -49,6 +49,7 @@ bool CheatInputMode = false;
|
|||
bool EveryCheat = false;
|
||||
bool mapcheat = false;
|
||||
extern bool FAF_DebugView;
|
||||
extern bool ToggleFlyMode;
|
||||
|
||||
const char *CheatKeyType;
|
||||
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;
|
||||
return GStrings(Player[player].Flags & PF_CLIP_CHEAT ? "CLIPPING: OFF" : "CLIPPING: ON");
|
||||
|
||||
case CHT_FLY:
|
||||
ToggleFlyMode = true;
|
||||
return nullptr;
|
||||
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -118,6 +118,8 @@ extern int FinishAnim;
|
|||
char PlayerGravity = PLAYER_JUMP_GRAV;
|
||||
#endif
|
||||
|
||||
bool ToggleFlyMode = false;
|
||||
|
||||
extern bool DebugOperate;
|
||||
|
||||
//unsigned char synctics, lastsynctics;
|
||||
|
@ -3711,19 +3713,10 @@ DoPlayerWadeSuperJump(PLAYERp pp)
|
|||
|
||||
bool PlayerFlyKey(void)
|
||||
{
|
||||
bool key = false;
|
||||
|
||||
if (!GodMode)
|
||||
if (!ToggleFlyMode)
|
||||
return false;
|
||||
|
||||
#if 0
|
||||
// Cheat or not, this simply won't do.
|
||||
key = inputState.GetKeyStatus(KEYSC_J);
|
||||
|
||||
if (key)
|
||||
inputState.ClearKeyStatus(KEYSC_J);
|
||||
#endif
|
||||
return key;
|
||||
ToggleFlyMode = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue