diff --git a/src/command.c b/src/command.c index bdeb5ac91..fb59909d1 100644 --- a/src/command.c +++ b/src/command.c @@ -2234,9 +2234,13 @@ void CV_AddValue(consvar_t *var, INT32 increment) // Special case for the playercolor variable, used only directly from the menu newvalue = var->value; if (increment > 0) // Going up! - newvalue = M_GetColorAfter(newvalue); + do + newvalue = M_GetColorAfter(newvalue); + while (!skincolors[newvalue].accessible); else if (increment < 0) // Going down! - newvalue = M_GetColorBefore(newvalue); + do + newvalue = M_GetColorBefore(newvalue); + while (!skincolors[newvalue].accessible); } else newvalue = var->value + increment; diff --git a/src/dehacked.c b/src/dehacked.c index b176562af..ae6b46781 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -290,9 +290,9 @@ INT32 DEH_ReadFreeslot(const char *type, const char *word, INT32 *out) } CONS_Printf("Skincolor SKINCOLOR_%s allocated.\n",word); DEH_Link(word, &skincolors[numskincolors].info, &skincolornames); - M_AddMenuColor(numskincolors); + M_AddMenuColor(numskincolors++); K_ReloadHUDColorCvar(); - *out = numskincolors++; + *out = numskincolors; return 0; } else if (fastcmp(type, "SPR2")) diff --git a/src/m_menu.c b/src/m_menu.c index 998665711..60371b6c1 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -7037,11 +7037,6 @@ INT32 MR_QuitMultiPlayerMenu(INT32 choice) void M_AddMenuColor(UINT16 color) { menucolor_t *c; - // SRB2Kart: I do not understand vanilla doesn't need this but WE do???!?!??! - if (!skincolors[color].accessible) { - return; - } - if (color >= numskincolors) { CONS_Printf("M_AddMenuColor: color %d does not exist.",color); return;