Disallow /load when practice mode is enabled

This commit is contained in:
Zwelf 2024-04-17 21:50:05 +02:00
parent 25f85afef5
commit f6f5629fd0

View file

@ -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");
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);
SaveResult->m_Status = CScoreSaveResult::LOAD_FAILED;
pController->Teams().SetSaving(Team, SaveResult);