Add "let's get fired up!" cheat (4th Gear)

This commit is contained in:
AJ Martinez 2024-02-29 17:43:07 -07:00
parent 1990c10635
commit d4d426e64b
4 changed files with 30 additions and 1 deletions

View file

@ -903,6 +903,7 @@ extern CV_PossibleValue_t renderhitbox_cons_t[];
consvar_t cv_renderhitbox = PlayerCheat("renderhitbox", "Off").values(renderhitbox_cons_t).description("Show hitboxes around objects");
consvar_t cv_mentalsonic = PlayerCheat("mentalsonic", "Off").values(CV_OnOff).flags(CV_HIDDEN).description("Works out at the library");
consvar_t cv_4thgear = PlayerCheat("4thgear", "Off").values(CV_OnOff).flags(CV_HIDDEN).description("Surpassing your limits!");
//
// Dummy variables used solely in the menu system.

View file

@ -98,7 +98,7 @@ extern consvar_t cv_kartdebugstart;
extern consvar_t cv_debugrank;
extern consvar_t cv_battletest;
extern consvar_t cv_mentalsonic;
extern consvar_t cv_mentalsonic, cv_4thgear;
typedef enum {
CV_CAPSULETEST_OFF,

View file

@ -422,6 +422,10 @@ fixed_t K_GetKartGameSpeedScalar(SINT8 value)
// Normal = 100%
// Hard = 118.75%
// Nightmare = 137.5% ?!?!
if (cv_4thgear.value && !netgame && (!demo.playback || !demo.netgame) && !modeattacking)
value = 3;
return ((13 + (3*value)) << FRACBITS) / 16;
}

View file

@ -177,6 +177,22 @@ static UINT8 cheatf_mentalsonic(void)
return 1;
}
static UINT8 cheatf_4thgear(void)
{
cv_4thgear.value = !(cv_4thgear.value);
if (cv_4thgear.value)
{
M_StartMessage("Restraint device compromised!", "Local play sped up to ""\x85""4th Gear!""\x80""\nLet's see what you're made of!\n\n""\x86""No effect in netplay and attack modes.", NULL, MM_NOTHING, NULL, NULL);
S_StartSound(NULL, sfx_gshc4);
}
else
{
S_StartSound(NULL, sfx_kc46);
}
return 1;
}
#ifdef DEVELOP
static UINT8 cheatf_devmode(void)
{
@ -254,6 +270,13 @@ static cheatseq_t cheat_mentalsonic = {
NULL, cheatf_mentalsonic,
(UINT8[]){ SCRAMBLE('m'), SCRAMBLE('e'), SCRAMBLE('n'), SCRAMBLE('t'), SCRAMBLE('a'), SCRAMBLE('l'), SCRAMBLE(' '), SCRAMBLE('s'), SCRAMBLE('o'), SCRAMBLE('n'), SCRAMBLE('i'), SCRAMBLE('c'), 0xff }
};
static cheatseq_t cheat_4thgear = {
NULL, cheatf_4thgear,
(UINT8[]){ SCRAMBLE('l'), SCRAMBLE('e'), SCRAMBLE('t'), SCRAMBLE('\''), SCRAMBLE('s'), SCRAMBLE(' '),
SCRAMBLE('g'), SCRAMBLE('e'), SCRAMBLE('t'), SCRAMBLE(' '),
SCRAMBLE('f'), SCRAMBLE('i'), SCRAMBLE('r'), SCRAMBLE('e'), SCRAMBLE('d'), SCRAMBLE(' '),
SCRAMBLE('u'), SCRAMBLE('p'), SCRAMBLE('!'), 0xff }
};
#ifdef DEVELOP
@ -275,6 +298,7 @@ cheatseq_t *cheatseqlist[] =
&cheat_savetheanimals,
&cheat_savetheframes,
&cheat_mentalsonic,
&cheat_4thgear,
#ifdef DEVELOP
&cheat_devmode,
&cheat_skipgoner,