Fix teamchange/teamchange2 to block changing FROM spectator rather than changing TO spectator

This way they're consistent with Got_Teamchange, which is the cause of the "illegal team change" desyncs
This commit is contained in:
Monster Iestyn 2017-03-02 14:25:46 +00:00
parent 9b737d1165
commit b837d5b23d

View file

@ -2116,7 +2116,7 @@ static void Command_Teamchange_f(void)
return;
}
if (!cv_allowteamchange.value && !NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
if (!cv_allowteamchange.value && NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
{
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
return;
@ -2213,7 +2213,7 @@ static void Command_Teamchange2_f(void)
return;
}
if (!cv_allowteamchange.value && !NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
if (!cv_allowteamchange.value && NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
{
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
return;