mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 07:22:03 +00:00
Change array size from MAXSKINS+1 to MAXSKINS+2
Also Set the values to 0/NULl, it will be overwritten later when a skin is assigned to the slot.
This commit is contained in:
parent
b6572eceae
commit
d6046088a0
2 changed files with 9 additions and 3 deletions
|
@ -514,10 +514,16 @@ const char *netxcmdnames[MAXNETXCMD - 1] =
|
|||
*/
|
||||
void D_RegisterServerCommands(void)
|
||||
{
|
||||
int i;
|
||||
Forceskin_cons_t[0].value = -1;
|
||||
Forceskin_cons_t[0].strvalue = "Off";
|
||||
Forceskin_cons_t[MAXSKINS].value = 0;
|
||||
Forceskin_cons_t[MAXSKINS].strvalue = NULL;
|
||||
|
||||
// Set the values to 0/NULl, it will be overwritten later when a skin is assigned to the slot.
|
||||
for (i = 1; i < MAXSKINS; i++)
|
||||
{
|
||||
Forceskin_cons_t[i].value = 0;
|
||||
Forceskin_cons_t[i].strvalue = NULL;
|
||||
}
|
||||
|
||||
RegisterNetXCmd(XD_NAMEANDCOLOR, Got_NameAndColor);
|
||||
RegisterNetXCmd(XD_WEAPONPREF, Got_WeaponPref);
|
||||
|
|
|
@ -40,7 +40,7 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
|
|||
//int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
CV_PossibleValue_t Forceskin_cons_t[MAXSKINS+1];
|
||||
CV_PossibleValue_t Forceskin_cons_t[MAXSKINS+2];
|
||||
|
||||
static void R_InitSkins(void);
|
||||
|
||||
|
|
Loading…
Reference in a new issue