mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Further tests and edge cases dealt with
This commit is contained in:
parent
2d4834ffcf
commit
a68b28fc14
|
@ -309,9 +309,12 @@ void CGameTeams::SetForceCharacterTeam(int ClientID, int Team)
|
||||||
for(int LoopClientID = 0; LoopClientID < MAX_CLIENTS; ++LoopClientID)
|
for(int LoopClientID = 0; LoopClientID < MAX_CLIENTS; ++LoopClientID)
|
||||||
if(GetPlayer(LoopClientID))
|
if(GetPlayer(LoopClientID))
|
||||||
SendTeamsState(LoopClientID);
|
SendTeamsState(LoopClientID);
|
||||||
|
|
||||||
if(GetPlayer(ClientID))
|
if(GetPlayer(ClientID))
|
||||||
|
{
|
||||||
GetPlayer(ClientID)->m_VotedForPractice = false;
|
GetPlayer(ClientID)->m_VotedForPractice = false;
|
||||||
|
GetPlayer(ClientID)->m_ClientSwapID = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Team != TEAM_SUPER && (m_TeamState[Team] == TEAMSTATE_EMPTY || m_TeamLocked[Team]))
|
if(Team != TEAM_SUPER && (m_TeamState[Team] == TEAMSTATE_EMPTY || m_TeamLocked[Team]))
|
||||||
|
@ -721,7 +724,8 @@ void CGameTeams::SwapTeamCharacters(CPlayer *Player, CPlayer *TargetPlayer, int
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Since > g_Config.m_SvSwapTimeout)
|
int TimeoutAfterDelay = g_Config.m_SvSaveGamesDelay + g_Config.m_SvSwapTimeout;
|
||||||
|
if(Since > TimeoutAfterDelay)
|
||||||
{
|
{
|
||||||
str_format(aBuf, sizeof(aBuf),
|
str_format(aBuf, sizeof(aBuf),
|
||||||
"Your swap request timed out %d seconds ago.",
|
"Your swap request timed out %d seconds ago.",
|
||||||
|
|
Loading…
Reference in a new issue