From 56c61a80ffd044c300e133434fea0abe97944615 Mon Sep 17 00:00:00 2001
From: Zwip-Zwap Zapony <ZwipZwapZapony@gmail.com>
Date: Thu, 22 Feb 2024 12:34:51 +0100
Subject: [PATCH] Change MAXSKINS from 256 to 255

A value of -1 is sometimes reserved for "no skin", leaving 255 other values for skin numbers
---
 src/doomdef.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/doomdef.h b/src/doomdef.h
index 4c843f9e2f..c7e9696e89 100644
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -244,12 +244,12 @@ extern char logfilename[1024];
 #define MAXPLAYERNAME 21
 #define PLAYERSMASK (MAXPLAYERS-1)
 
-// Don't make MAXSKINS higher than 256, since skin numbers are used with an
-// UINT8 in various parts of the codebase. If you do anyway, the data type
-// of those variables will have to be changed into at least an UINT16.
+// Don't make MAXSKINS higher than 255, since skin numbers are used with an UINT8 in
+// various parts of the codebase, and one number is reserved. If you do anyway,
+// the data type of those variables will have to be changed into at least an UINT16.
 // This change must affect code such as demo recording and playback,
 // and the structure of some networking packets and commands.
-#define MAXSKINS 256
+#define MAXSKINS 255
 #define MAXCHARACTERSLOTS (MAXSKINS * 3) // Should be higher than MAXSKINS.
 
 #define COLORRAMPSIZE 16
-- 
GitLab