diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 3e82fc60c..590543f00 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -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 diff --git a/src/m_cheat.c b/src/m_cheat.c index 29e8c8a02..da449b2f7 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -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 diff --git a/src/m_cheat.h b/src/m_cheat.h index aa9b0bfeb..f5d59120b 100644 --- a/src/m_cheat.h +++ b/src/m_cheat.h @@ -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