Only allow /save when team is started already (prevents saving after

noobfilter)
This commit is contained in:
def 2015-07-09 23:47:36 +02:00
parent 4efaa85e7a
commit 73229fbb62
2 changed files with 9 additions and 1 deletions

View file

@ -220,6 +220,12 @@ int CSaveTeam::save(int Team)
}
m_TeamState = Teams->GetTeamState(Team);
if(m_TeamState != CGameTeams::TEAMSTATE_STARTED)
{
return 4;
}
m_NumSwitchers = m_pController->GameServer()->Collision()->m_NumSwitchers;
m_TeamLocked = Teams->TeamLocked(Team);

View file

@ -1625,7 +1625,6 @@ void CSqlScore::SaveTeamThread(void *pUser)
CSaveTeam* SavedTeam = 0;
CSqlTeamSave *pData = (CSqlTeamSave *)pUser;
char TeamString[65536];
int Team = pData->m_Team;
char OriginalCode[32];
@ -1652,6 +1651,9 @@ void CSqlScore::SaveTeamThread(void *pUser)
case 3:
pData->m_pSqlData->GameServer()->SendChatTarget(pData->m_ClientID, "Unable to find all Characters");
break;
case 4:
pData->m_pSqlData->GameServer()->SendChatTarget(pData->m_ClientID, "Your team is not started yet");
break;
}
if(!Num)
{