diff --git a/src/game/server/ddracechat.cpp b/src/game/server/ddracechat.cpp index f48b1b9c5..582e16b07 100644 --- a/src/game/server/ddracechat.cpp +++ b/src/game/server/ddracechat.cpp @@ -667,7 +667,7 @@ void CGameContext::ConPractice(IConsole::IResult *pResult, void *pUserData) if(NumCurrentVotes >= NumRequiredVotes) { - Teams.EnablePractice(Team); + Teams.SetPractice(Team, true); pSelf->SendChatTeam(Team, "Practice mode enabled for your team, happy practicing!"); } } diff --git a/src/game/server/save.cpp b/src/game/server/save.cpp index 4636bfb09..e18bd5136 100644 --- a/src/game/server/save.cpp +++ b/src/game/server/save.cpp @@ -517,8 +517,7 @@ void CSaveTeam::Load(int Team, bool KeepCurrentWeakStrong) pTeams->ChangeTeamState(Team, m_TeamState); pTeams->SetTeamLock(Team, m_TeamLocked); - if(m_Practice) - pTeams->EnablePractice(Team); + pTeams->SetPractice(Team, m_Practice); for(int i = m_MembersCount; i-- > 0;) { diff --git a/src/game/server/teams.h b/src/game/server/teams.h index d44a4892c..12195dad1 100644 --- a/src/game/server/teams.h +++ b/src/game/server/teams.h @@ -183,14 +183,14 @@ public: return m_pSaveTeamResult[TeamID] != nullptr; } - void EnablePractice(int Team) + void SetPractice(int Team, bool Enabled) { if(Team < TEAM_FLOCK || Team >= TEAM_SUPER) return; if(g_Config.m_SvTeam != SV_TEAM_FORCED_SOLO && Team == TEAM_FLOCK) return; - m_Practice[Team] = true; + m_Practice[Team] = Enabled; } bool IsPractice(int Team)