From 290adb23726da907099f59936a8e8103677f6031 Mon Sep 17 00:00:00 2001 From: Jaime Ita Passos Date: Tue, 10 Aug 2021 17:02:43 -0300 Subject: [PATCH] Add a descriptive comment about the MAXSKINS macro --- src/doomdef.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/doomdef.h b/src/doomdef.h index cf209bc8a..43e25b064 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -223,8 +223,13 @@ 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. +// This change must affect code such as demo recording and playback, +// and the structure of some networking packets and commands. #define MAXSKINS 256 -#define MAXCHARACTERSLOTS (MAXSKINS * 3) +#define MAXCHARACTERSLOTS (MAXSKINS * 3) // Should be higher than MAXSKINS. #define COLORRAMPSIZE 16 #define MAXCOLORNAME 32