Fix: /lock 0 and /lock 1

This commit is contained in:
def 2014-04-28 17:02:39 +02:00
parent 4782d34667
commit 13c0c5b400

View file

@ -643,9 +643,14 @@ void CGameContext::ConLockTeam(IConsole::IResult *pResult, void *pUserData)
int Team = ((CGameControllerDDRace*) pSelf->m_pController)->m_Teams.m_Core.Team(pResult->m_ClientID); int Team = ((CGameControllerDDRace*) pSelf->m_pController)->m_Teams.m_Core.Team(pResult->m_ClientID);
bool Lock = ((CGameControllerDDRace*) pSelf->m_pController)->m_Teams.TeamLocked(Team);
if (pResult->NumArguments() > 0)
Lock = !pResult->GetInteger(0);
if(Team > TEAM_FLOCK && Team < TEAM_SUPER) if(Team > TEAM_FLOCK && Team < TEAM_SUPER)
{ {
if(((CGameControllerDDRace*) pSelf->m_pController)->m_Teams.TeamLocked(Team)) if(Lock)
{ {
((CGameControllerDDRace*) pSelf->m_pController)->m_Teams.SetTeamLock(Team, false); ((CGameControllerDDRace*) pSelf->m_pController)->m_Teams.SetTeamLock(Team, false);