mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Got_TeamChange: Applying PF_WANTSTOJOIN is NOT a playstate change
This commit is contained in:
parent
39d9dc99aa
commit
3d383f209e
1 changed files with 7 additions and 1 deletions
|
|
@ -4076,6 +4076,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
|
|
||||||
//Now that we've done our error checking and killed the player
|
//Now that we've done our error checking and killed the player
|
||||||
//if necessary, put the player on the correct team/status.
|
//if necessary, put the player on the correct team/status.
|
||||||
|
boolean nochangeoccourred = false;
|
||||||
|
|
||||||
if (G_GametypeHasTeams())
|
if (G_GametypeHasTeams())
|
||||||
{
|
{
|
||||||
if (!NetPacket.packet.newteam)
|
if (!NetPacket.packet.newteam)
|
||||||
|
|
@ -4087,6 +4089,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
{
|
{
|
||||||
players[playernum].ctfteam = NetPacket.packet.newteam;
|
players[playernum].ctfteam = NetPacket.packet.newteam;
|
||||||
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||||
|
nochangeoccourred = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (G_GametypeHasSpectators())
|
else if (G_GametypeHasSpectators())
|
||||||
|
|
@ -4094,7 +4097,10 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
if (!NetPacket.packet.newteam)
|
if (!NetPacket.packet.newteam)
|
||||||
players[playernum].spectator = true;
|
players[playernum].spectator = true;
|
||||||
else
|
else
|
||||||
|
{
|
||||||
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
players[playernum].pflags |= PF_WANTSTOJOIN; //players[playernum].spectator = false;
|
||||||
|
nochangeoccourred = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NetPacket.packet.autobalance)
|
if (NetPacket.packet.autobalance)
|
||||||
|
|
@ -4135,7 +4141,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (gamestate != GS_LEVEL)
|
if (gamestate != GS_LEVEL || nochangeoccourred == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FinalisePlaystateChange(playernum);
|
FinalisePlaystateChange(playernum);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue