mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Disallow /load
when practice mode is enabled
This commit is contained in:
parent
25f85afef5
commit
f6f5629fd0
|
@ -358,6 +358,11 @@ void CScore::LoadTeam(const char *pCode, int ClientId)
|
||||||
GameServer()->SendChatTarget(ClientId, "Team can't be loaded while in team 0 mode");
|
GameServer()->SendChatTarget(ClientId, "Team can't be loaded while in team 0 mode");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(pController->Teams().IsPractice(Team))
|
||||||
|
{
|
||||||
|
GameServer()->SendChatTarget(ClientId, "Team can't be loaded while practice is enabled");
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto SaveResult = std::make_shared<CScoreSaveResult>(ClientId);
|
auto SaveResult = std::make_shared<CScoreSaveResult>(ClientId);
|
||||||
SaveResult->m_Status = CScoreSaveResult::LOAD_FAILED;
|
SaveResult->m_Status = CScoreSaveResult::LOAD_FAILED;
|
||||||
pController->Teams().SetSaving(Team, SaveResult);
|
pController->Teams().SetSaving(Team, SaveResult);
|
||||||
|
|
Loading…
Reference in a new issue