Fix the issue where skincolor and character (and inadvertedly, name changes and followers) would not be sent to the server, leading to the 0,0 Ashura bug.

This commit is contained in:
toaster 2020-09-22 19:55:22 +01:00
parent a43f88074e
commit 5da7722255

View file

@ -1370,7 +1370,7 @@ static void SendNameAndColor(UINT8 n)
char buf[MAXPLAYERNAME+9];
char *p;
if (splitscreen < playernum)
if (splitscreen < n)
return; // can happen if skin4/color4/name4 changed
if (playernum == -1)
@ -1514,13 +1514,6 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
}
}
if (i > splitscreen)
{
CONS_Alert(CONS_WARNING, M_GetText("Illegal color change received from %s (team: %d), color: %d)\n"), player_names[playernum], p->ctfteam, p->skincolor);
SendKick(playernum, KICK_MSG_CON_FAIL | KICK_MSG_KEEP_BODY);
return;
}
READSTRINGN(*cp, name, MAXPLAYERNAME);
p->availabilities = READUINT32(*cp);
color = READUINT16(*cp);