mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 21:31:46 +00:00
Fix P_WriteSkincolor
This commit is contained in:
parent
b6f41bd7b8
commit
d589953fc4
1 changed files with 9 additions and 1 deletions
|
@ -50,6 +50,7 @@
|
|||
#include "m_random.h"
|
||||
|
||||
#include "dehacked.h" // for map headers
|
||||
#include "deh_tables.h" // FREE_SKINCOLORS
|
||||
#include "r_main.h"
|
||||
#include "m_cond.h" // for emblems
|
||||
|
||||
|
@ -1266,12 +1267,19 @@ static void P_WriteDuplicateText(const char *text, char **target)
|
|||
|
||||
static void P_WriteSkincolor(INT32 constant, char **target)
|
||||
{
|
||||
const char *color_name;
|
||||
|
||||
if (constant <= SKINCOLOR_NONE
|
||||
|| constant >= (INT32)numskincolors)
|
||||
return;
|
||||
|
||||
if (constant >= SKINCOLOR_FIRSTFREESLOT)
|
||||
color_name = FREE_SKINCOLORS[constant - SKINCOLOR_FIRSTFREESLOT];
|
||||
else
|
||||
color_name = COLOR_ENUMS[constant];
|
||||
|
||||
P_WriteDuplicateText(
|
||||
va("SKINCOLOR_%s", skincolors[constant].name),
|
||||
va("SKINCOLOR_%s", color_name),
|
||||
target
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue