From 8326292a3fa6e9433ccfed20a6b64fce57234ce8 Mon Sep 17 00:00:00 2001
From: James R <justsomejames2@gmail.com>
Date: Sun, 5 May 2024 20:48:30 -0700
Subject: [PATCH] Fix staffghost loading for old demo version

---
 src/g_demo.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/g_demo.cpp b/src/g_demo.cpp
index 2e21a7d7ed..6da10879b8 100644
--- a/src/g_demo.cpp
+++ b/src/g_demo.cpp
@@ -2525,6 +2525,8 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
 	{
 	case DEMOVERSION: // latest always supported
 	case 0x0009: // older staff ghosts
+	case 0x000A: // older staff ghosts
+	case 0x000B: // older staff ghosts
 		break;
 	// too old, cannot support.
 	default:
@@ -2674,6 +2676,8 @@ void G_LoadDemoInfo(menudemo_t *pdemo, boolean allownonmultiplayer)
 	{
 	case DEMOVERSION: // latest always supported
 	case 0x0009: // older staff ghosts
+	case 0x000A: // older staff ghosts
+	case 0x000B: // older staff ghosts
 		if (P_SaveBufferRemaining(&info) < 64)
 		{
 			goto corrupt;
@@ -3101,6 +3105,8 @@ void G_DoPlayDemoEx(const char *defdemoname, lumpnum_t deflumpnum)
 	{
 	case DEMOVERSION: // latest always supported
 	case 0x0009: // older staff ghosts
+	case 0x000A: // older staff ghosts
+	case 0x000B: // older staff ghosts
 		break;
 	// too old, cannot support.
 	default:
@@ -3559,6 +3565,8 @@ void G_AddGhost(savebuffer_t *buffer, const char *defdemoname)
 	{
 	case DEMOVERSION: // latest always supported
 	case 0x0009: // older staff ghosts
+	case 0x000A: // older staff ghosts
+	case 0x000B: // older staff ghosts
 		break;
 	// too old, cannot support.
 	default:
@@ -3815,6 +3823,8 @@ staffbrief_t *G_GetStaffGhostBrief(UINT8 *buffer)
 	{
 		case DEMOVERSION: // latest always supported
 		case 0x0009: // older staff ghosts
+		case 0x000A: // older staff ghosts
+		case 0x000B: // older staff ghosts
 			break;
 
 		// too old, cannot support.
-- 
GitLab