diff --git a/src/cvars.cpp b/src/cvars.cpp index fd93e79f8..82d0b12f1 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -892,6 +892,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"); + // // Dummy variables used solely in the menu system. // todo: add a way to use non-console variables in the menu diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 21bdc53bd..b3b58de8b 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -98,6 +98,8 @@ extern consvar_t cv_kartdebugstart; extern consvar_t cv_debugrank; extern consvar_t cv_battletest; +extern consvar_t cv_mentalsonic; + typedef enum { CV_CAPSULETEST_OFF, CV_CAPSULETEST_MULTIPLAYER, diff --git a/src/k_kart.c b/src/k_kart.c index 7334567a9..b04135e98 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -5983,6 +5983,9 @@ void K_Squish(mobj_t *mo) mo->spriteyscale = FixedDiv(FRACUNIT, mo->spritexscale); + + if (cv_mentalsonic.value && mo->type == MT_PLAYER) + mo->spriteyscale *= 2; } static mobj_t *K_FindLastTrailMobj(player_t *player) diff --git a/src/m_cheat.c b/src/m_cheat.c index f6bdda6bf..12b921d56 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -162,6 +162,21 @@ static UINT8 cheatf_savetheframes(void) return 1; } +static UINT8 cheatf_mentalsonic(void) +{ + cv_mentalsonic.value = !(cv_mentalsonic.value); + if (cv_mentalsonic.value) + { + S_StartSound(NULL, sfx_gshbb); + } + else + { + S_StartSound(NULL, sfx_kc46); + } + + return 1; +} + #ifdef DEVELOP static UINT8 cheatf_devmode(void) { @@ -235,6 +250,12 @@ static cheatseq_t cheat_savetheframes = { (UINT8[]){ SCRAMBLE('s'), SCRAMBLE('a'), SCRAMBLE('v'), SCRAMBLE('e'), SCRAMBLE('t'), SCRAMBLE('h'), SCRAMBLE('e'), SCRAMBLE('f'), SCRAMBLE('r'), SCRAMBLE('a'), SCRAMBLE('m'), SCRAMBLE('e'), SCRAMBLE('s'), 0xff } }; +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 } +}; + + #ifdef DEVELOP static cheatseq_t cheat_devmode = { NULL, cheatf_devmode, @@ -253,6 +274,7 @@ cheatseq_t *cheatseqlist[] = &cheat_wrongwarp, &cheat_savetheanimals, &cheat_savetheframes, + &cheat_mentalsonic, #ifdef DEVELOP &cheat_devmode, &cheat_skipgoner,