mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-22 14:37:42 +00:00
Try fixing vote party crash
This commit is contained in:
parent
8a2dc00fe8
commit
dc45f4427b
2 changed files with 9 additions and 3 deletions
|
|
@ -3738,8 +3738,6 @@ static void Got_AddPlayer(const UINT8 **p, INT32 playernum)
|
|||
|
||||
CONS_Debug(DBG_NETPLAY, "addplayer: %d %d\n", node, newplayernum);
|
||||
|
||||
//G_SpectatePlayerOnJoin(newplayernum); -- caused desyncs in this spot :(
|
||||
|
||||
if (newplayernum+1 > doomcom->numslots)
|
||||
doomcom->numslots = (INT16)(newplayernum+1);
|
||||
|
||||
|
|
@ -3755,6 +3753,13 @@ static void Got_AddPlayer(const UINT8 **p, INT32 playernum)
|
|||
G_AddPlayer(newplayernum, console);
|
||||
memcpy(players[newplayernum].public_key, public_key, PUBKEYLENGTH);
|
||||
|
||||
// Previously called at the top of this function, commented as
|
||||
// "caused desyncs in this spot :(". But we can't do this in
|
||||
// G_PlayerReborn, since that only runs for level contexts and
|
||||
// allows people to party-crash the vote screen even when
|
||||
// maxplayers is too low for them. Let's try it here...?
|
||||
G_SpectatePlayerOnJoin(newplayernum);
|
||||
|
||||
for (i = 0; i < MAXAVAILABILITY; i++)
|
||||
{
|
||||
newplayer->availabilities[i] = READUINT8(*p);
|
||||
|
|
|
|||
|
|
@ -2313,7 +2313,8 @@ void G_PlayerReborn(INT32 player, boolean betweenmaps)
|
|||
jointime = players[player].jointime;
|
||||
if (jointime <= 1)
|
||||
{
|
||||
G_SpectatePlayerOnJoin(player);
|
||||
// Now called in Got_AddPlayer. In case of weirdness, break glass.
|
||||
// G_SpectatePlayerOnJoin(player);
|
||||
betweenmaps = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue