From a6c52f5bad1f2507e4fa8ea648b4667bc9287fc9 Mon Sep 17 00:00:00 2001
From: spherallic <spherallic@gmail.com>
Date: Tue, 22 Feb 2022 15:49:16 +0100
Subject: [PATCH] Move MT_RAY to the very end of the mobj list.

---
 src/deh_tables.c |  2 +-
 src/info.c       | 54 ++++++++++++++++++++++++------------------------
 src/info.h       |  2 +-
 3 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/deh_tables.c b/src/deh_tables.c
index 9db18be9bd..9aacd3c50d 100644
--- a/src/deh_tables.c
+++ b/src/deh_tables.c
@@ -3496,7 +3496,6 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
 // because sadly no one remembers this place while searching for full state names.
 const char *const MOBJTYPE_LIST[] = {  // array length left dynamic for sanity testing later.
 	"MT_NULL",
-	"MT_RAY",
 	"MT_UNKNOWN",
 
 	"MT_THOK", // Thok! mobj
@@ -4270,6 +4269,7 @@ const char *const MOBJTYPE_LIST[] = {  // array length left dynamic for sanity t
 	"MT_YELLOWBRICKDEBRIS",
 
 	"MT_NAMECHECK",
+	"MT_RAY",
 };
 
 const char *const MOBJFLAG_LIST[] = {
diff --git a/src/info.c b/src/info.c
index 991bf383e7..fe419b5c44 100644
--- a/src/info.c
+++ b/src/info.c
@@ -3964,33 +3964,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
 		S_NULL          // raisestate
 	},
 
-	{           // MT_RAY
-		-1,             // doomednum
-		S_NULL,         // spawnstate
-		0,              // spawnhealth
-		S_NULL,         // seestate
-		sfx_None,       // seesound
-		0,              // reactiontime
-		sfx_None,       // attacksound
-		S_NULL,         // painstate
-		0,              // painchance
-		sfx_None,       // painsound
-		S_NULL,         // meleestate
-		S_NULL,         // missilestate
-		S_NULL,         // deathstate
-		S_NULL,         // xdeathstate
-		sfx_None,       // deathsound
-		0,              // speed
-		0,              // radius
-		0,              // height
-		0,              // display offset
-		0,              // mass
-		0,              // damage
-		sfx_None,       // activesound
-		MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
-		S_NULL          // raisestate
-	},
-
 	{           // MT_UNKNOWN
 		-1,             // doomednum
 		S_UNKNOWN,      // spawnstate
@@ -21712,6 +21685,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
 		MF_NOBLOCKMAP|MF_MISSILE|MF_NOGRAVITY|MF_NOSECTOR, // flags
 		S_NULL          // raisestate
 	},
+
+	{           // MT_RAY
+		-1,             // doomednum
+		S_NULL,         // spawnstate
+		0,              // spawnhealth
+		S_NULL,         // seestate
+		sfx_None,       // seesound
+		0,              // reactiontime
+		sfx_None,       // attacksound
+		S_NULL,         // painstate
+		0,              // painchance
+		sfx_None,       // painsound
+		S_NULL,         // meleestate
+		S_NULL,         // missilestate
+		S_NULL,         // deathstate
+		S_NULL,         // xdeathstate
+		sfx_None,       // deathsound
+		0,              // speed
+		0,              // radius
+		0,              // height
+		0,              // display offset
+		0,              // mass
+		0,              // damage
+		sfx_None,       // activesound
+		MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY, // flags
+		S_NULL          // raisestate
+	},
 };
 
 skincolor_t skincolors[MAXSKINCOLORS] = {
diff --git a/src/info.h b/src/info.h
index 9ceeead2c6..0539f0b123 100644
--- a/src/info.h
+++ b/src/info.h
@@ -4316,7 +4316,6 @@ extern playersprite_t free_spr2;
 typedef enum mobj_type
 {
 	MT_NULL,
-	MT_RAY, // General purpose mobj
 	MT_UNKNOWN,
 
 	MT_THOK, // Thok! mobj
@@ -5090,6 +5089,7 @@ typedef enum mobj_type
 	MT_YELLOWBRICKDEBRIS, // for CEZ3
 
 	MT_NAMECHECK,
+	MT_RAY, // General purpose mobj
 
 	MT_FIRSTFREESLOT,
 	MT_LASTFREESLOT = MT_FIRSTFREESLOT + NUMMOBJFREESLOTS - 1,
-- 
GitLab