diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 5e76ce077..dd1234f0a 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -823,7 +823,6 @@ void D_RegisterClientCommands(void) COM_AddCommand("getallemeralds", Command_Getallemeralds_f); COM_AddCommand("resetemeralds", Command_Resetemeralds_f); COM_AddCommand("setrings", Command_Setrings_f); - COM_AddCommand("setspheres", Command_Setspheres_f); COM_AddCommand("setlives", Command_Setlives_f); COM_AddCommand("setcontinues", Command_Setcontinues_f); COM_AddCommand("devmode", Command_Devmode_f); diff --git a/src/m_cheat.c b/src/m_cheat.c index 5e152fc7b..3e512034d 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -880,28 +880,19 @@ void Command_Setrings_f(void) if (COM_Argc() > 1) { - // P_GivePlayerRings does value clamping - players[consoleplayer].rings = 0; - P_GivePlayerRings(&players[consoleplayer], atoi(COM_Argv(1))); - if (!G_IsSpecialStage(gamemap) || !(maptol & TOL_NIGHTS)) + if (!(maptol & TOL_NIGHTS)) + { + // P_GivePlayerRings does value clamping + players[consoleplayer].rings = 0; + P_GivePlayerRings(&players[consoleplayer], atoi(COM_Argv(1))); players[consoleplayer].totalring -= atoi(COM_Argv(1)); //undo totalring addition done in P_GivePlayerRings - - G_SetGameModified(multiplayer); - } -} - -void Command_Setspheres_f(void) -{ - REQUIRE_INLEVEL; - REQUIRE_SINGLEPLAYER; - REQUIRE_NOULTIMATE; - REQUIRE_PANDORA; - - if (COM_Argc() > 1) - { - // P_GivePlayerRings does value clamping - players[consoleplayer].spheres = 0; - P_GivePlayerSpheres(&players[consoleplayer], atoi(COM_Argv(1))); + } + else + { + players[consoleplayer].spheres = 0; + P_GivePlayerSpheres(&player[consoleplayer], atoi(COM_Argv(1))); + // no totalsphere addition to revert + } G_SetGameModified(multiplayer); } diff --git a/src/m_cheat.h b/src/m_cheat.h index 2af4c2de6..d50ddc119 100644 --- a/src/m_cheat.h +++ b/src/m_cheat.h @@ -51,7 +51,6 @@ void Command_Savecheckpoint_f(void); void Command_Getallemeralds_f(void); void Command_Resetemeralds_f(void); void Command_Setrings_f(void); -void Command_Setspheres_f(void); void Command_Setlives_f(void); void Command_Setcontinues_f(void); void Command_Devmode_f(void);