Add shittysigns cheat

This commit is contained in:
AJ Martinez 2024-03-02 04:27:41 -07:00
parent 4fc6567dc6
commit 47a9cce133
7 changed files with 31 additions and 4 deletions

View file

@ -902,7 +902,8 @@ consvar_t cv_palettenum = PlayerCheat("palettenum", "0").values(CV_Unsigned).onc
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_mentalsonic = Player("mentalsonic", "Off").dont_save().values(CV_OnOff).flags(CV_NOSHOWHELP).description("Works out at the library");
consvar_t cv_shittysigns = Player("shittysigns", "Off").dont_save().values(CV_OnOff).flags(CV_NOSHOWHELP).description("It's better because it's worse");
//
// Dummy variables used solely in the menu system.

View file

@ -99,6 +99,7 @@ extern consvar_t cv_debugrank;
extern consvar_t cv_battletest;
extern consvar_t cv_mentalsonic;
extern consvar_t cv_shittysigns;
typedef enum {
CV_CAPSULETEST_OFF,

View file

@ -1186,7 +1186,7 @@ static void HWR_GetBlendedTexture(patch_t *patch, patch_t *blendpatch, INT32 ski
static boolean HWR_AllowModel(mobj_t *mobj)
{
// Don't allow rendering of model for these.
if (mobj->sprite2 == SPR2_XTRA || mobj->sprite2 == SPR2_SIGN || mobj->sprite2 == SPR2_SIGL || mobj->sprite2 == SPR2_TALK)
if (mobj->sprite2 == SPR2_XTRA || mobj->sprite2 == SPR2_SIGN || mobj->sprite2 == SPR2_SIGL || mobj->sprite2 == SPR2_SSIG || mobj->sprite2 == SPR2_TALK)
return false;
// Otherwise, render the model.

View file

@ -762,7 +762,7 @@ char spr2names[NUMPLAYERSPRITES][5] =
"SPIN", // Spinout
"DEAD", // Dead
"SIGN", "SIGL", // Finish signpost
"SIGN", "SIGL", "SSIG", // Finish signpost
"XTRA", // Three Faces of Darkness
"TALK", // Dialogue
};
@ -806,6 +806,7 @@ playersprite_t spr2defaults[NUMPLAYERSPRITES] = {
0, // SPR2_SIGN
SPR2_SIGN, // SPR2_SIGL
SPR2_SIGN, // SPR2_SSIG
0, // SPR2_XTRA
0, // SPR2_TALK
};

View file

@ -1296,7 +1296,7 @@ typedef enum playersprite
SPR2_DRRN, SPR2_DRRO, SPR2_DRRI,
SPR2_SPIN,
SPR2_DEAD,
SPR2_SIGN, SPR2_SIGL,
SPR2_SIGN, SPR2_SIGL, SPR2_SSIG,
SPR2_XTRA,
SPR2_TALK,

View file

@ -177,6 +177,21 @@ static UINT8 cheatf_mentalsonic(void)
return 1;
}
static UINT8 cheatf_shittysigns(void)
{
cv_shittysigns.value = !(cv_shittysigns.value);
if (cv_shittysigns.value)
{
S_StartSound(NULL, sfx_mixup);
}
else
{
S_StartSound(NULL, sfx_nghurt);
}
return 1;
}
#ifdef DEVELOP
static UINT8 cheatf_devmode(void)
{
@ -255,6 +270,10 @@ static cheatseq_t cheat_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_shittysigns = {
NULL, cheatf_shittysigns,
(UINT8[]){ SCRAMBLE('i'), SCRAMBLE('d'), SCRAMBLE('s'), SCRAMBLE('p'), SCRAMBLE('i'), SCRAMBLE('s'), SCRAMBLE('p'), SCRAMBLE('o'), SCRAMBLE('p'), SCRAMBLE('d'), 0xff }
};
#ifdef DEVELOP
static cheatseq_t cheat_devmode = {
@ -275,6 +294,7 @@ cheatseq_t *cheatseqlist[] =
&cheat_savetheanimals,
&cheat_savetheframes,
&cheat_mentalsonic,
&cheat_shittysigns,
#ifdef DEVELOP
&cheat_devmode,
&cheat_skipgoner,

View file

@ -8912,9 +8912,13 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
{
cur->skin = &skins[newplayer->skin];
cur->color = newplayer->skincolor;
// Even if we didn't have the Perfect Sign to consider,
// it's still necessary to refresh SPR2 on skin changes.
P_SetMobjState(cur, (newperfect == true) ? S_KART_SIGL : S_KART_SIGN);
if (cv_shittysigns.value && cur->state != &states[S_KART_SIGL])
cur->sprite2 = P_GetSkinSprite2(&skins[newplayer->skin], SPR2_SSIG, NULL);;
}
}
else if (cur->state == &states[S_SIGN_ERROR])