2D toggle command

This commit is contained in:
Steel Titanium 2019-09-06 20:51:39 -04:00
parent 4c39225c3e
commit bc52bc83cc
No known key found for this signature in database
GPG Key ID: 924BA411F18DFDBE
3 changed files with 14 additions and 0 deletions

View File

@ -849,6 +849,7 @@ void D_RegisterClientCommands(void)
COM_AddCommand("rteleport", Command_RTeleport_f);
COM_AddCommand("skynum", Command_Skynum_f);
COM_AddCommand("weather", Command_Weather_f);
COM_AddCommand("toggletwod", Command_Toggletwod_f);
#ifdef _DEBUG
COM_AddCommand("causecfail", Command_CauseCfail_f);
#endif

View File

@ -746,6 +746,18 @@ void Command_Weather_f(void)
P_SwitchWeather(atoi(COM_Argv(1)));
}
void Command_Toggletwod_f(void)
{
player_t *p = &players[consoleplayer];
REQUIRE_DEVMODE;
REQUIRE_INLEVEL;
REQUIRE_SINGLEPLAYER;
if (p->mo)
p->mo->flags2 ^= MF2_TWOD;
}
#ifdef _DEBUG
// You never thought you needed this, did you? >=D
// Yes, this has the specific purpose of completely screwing you up

View File

@ -64,6 +64,7 @@ void Command_Teleport_f(void);
void Command_RTeleport_f(void);
void Command_Skynum_f(void);
void Command_Weather_f(void);
void Command_Toggletwod_f(void);
#ifdef _DEBUG
void Command_CauseCfail_f(void);
#endif