From 365a59f1863ff044b17376bf76aca6b9c1a6f482 Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Thu, 16 Aug 2018 11:34:57 -0400
Subject: [PATCH] Revert "SETSPHERES console command for debugging/cheating"

This reverts commit 4cb7036f513ea9a0c1c743a1de69c40294597c27.
---
 src/d_netcmd.c |  1 -
 src/m_cheat.c  | 17 -----------------
 src/m_cheat.h  |  1 -
 src/p_inter.c  |  2 +-
 4 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/src/d_netcmd.c b/src/d_netcmd.c
index 0cb1d4497f..c901fabd5d 100644
--- a/src/d_netcmd.c
+++ b/src/d_netcmd.c
@@ -822,7 +822,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 b572b84eb5..5ac7422707 100644
--- a/src/m_cheat.c
+++ b/src/m_cheat.c
@@ -890,23 +890,6 @@ void Command_Setrings_f(void)
 	}
 }
 
-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)));
-
-		G_SetGameModified(multiplayer);
-	}
-}
-
 void Command_Setlives_f(void)
 {
 	REQUIRE_INLEVEL;
diff --git a/src/m_cheat.h b/src/m_cheat.h
index 31f650b3fd..951c7a16a2 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);
diff --git a/src/p_inter.c b/src/p_inter.c
index ce8bba6b6e..e740b62d18 100644
--- a/src/p_inter.c
+++ b/src/p_inter.c
@@ -3409,7 +3409,7 @@ void P_PlayerRingBurst(player_t *player, INT32 num_rings)
 		return;
 
 	// If no health, don't spawn ring!
-	if (((maptol & TOL_NIGHTS) && player->spheres <= 0) || (!(maptol & TOL_NIGHTS) && player->rings <= 0))
+	if (player->rings <= 0)
 		num_rings = 0;
 
 	if (num_rings > 32 && player->powers[pw_carry] != CR_NIGHTSFALL)
-- 
GitLab