mirror of
https://github.com/fortressforever/fortressforever-2013.git
synced 2024-11-29 15:41:45 +00:00
refactor UpdateLimit / UpdateLimits -> UpdateClass / UpdateAllClassLimits so its clear what it does (and matches SetClassLimit)
This commit is contained in:
parent
0d1b299a34
commit
c9c90de4f3
2 changed files with 7 additions and 7 deletions
|
@ -68,7 +68,7 @@ static void ClassRestrictionChange( IConVar *var, const char *pOldString, float
|
||||||
|
|
||||||
if ( idx == -1 )
|
if ( idx == -1 )
|
||||||
return;
|
return;
|
||||||
pTeam->UpdateLimit( idx );
|
pTeam->UpdateClassLimit( idx );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,10 +143,10 @@ void CFF_SH_TeamManager::SetClassLimit( int iClass, int iLimit )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_iClassesMap[iClass] = iLimit;
|
m_iClassesMap[iClass] = iLimit;
|
||||||
UpdateLimit( iClass );
|
UpdateClassLimit( iClass );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFF_SH_TeamManager::UpdateLimit( int iClassIdx )
|
void CFF_SH_TeamManager::UpdateClassLimit( int iClassIdx )
|
||||||
{
|
{
|
||||||
// if the map or cvar is 0 it will always use the other
|
// if the map or cvar is 0 it will always use the other
|
||||||
int curCvar = classRestrictionCvars[iClassIdx].GetInt();
|
int curCvar = classRestrictionCvars[iClassIdx].GetInt();
|
||||||
|
@ -157,10 +157,10 @@ void CFF_SH_TeamManager::UpdateLimit( int iClassIdx )
|
||||||
DevMsg("CFF_SH_TeamManager::UpdateLimit: set class idx %i limit to %i\n", iClassIdx, newVal );
|
DevMsg("CFF_SH_TeamManager::UpdateLimit: set class idx %i limit to %i\n", iClassIdx, newVal );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFF_SH_TeamManager::UpdateAllLimits( void )
|
void CFF_SH_TeamManager::UpdateAllClassLimits( void )
|
||||||
{
|
{
|
||||||
for ( int i = 0; i < ARRAYSIZE(m_iClassesMap); i++ )
|
for ( int i = 0; i < ARRAYSIZE(m_iClassesMap); i++ )
|
||||||
UpdateLimit( i );
|
UpdateClassLimit( i );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFF_SH_TeamManager::SetDeaths( int iDeaths )
|
void CFF_SH_TeamManager::SetDeaths( int iDeaths )
|
||||||
|
|
|
@ -58,8 +58,8 @@ public:
|
||||||
void SetName( const char *pName );
|
void SetName( const char *pName );
|
||||||
void SetFortPoints( int iFortPoints );
|
void SetFortPoints( int iFortPoints );
|
||||||
void SetTeamLimits( int );
|
void SetTeamLimits( int );
|
||||||
void UpdateLimit( int idx );
|
void UpdateClassLimit( int idx );
|
||||||
void UpdateAllLimits( void );
|
void UpdateAllClassLimits( void );
|
||||||
|
|
||||||
#endif // GAME_DLL
|
#endif // GAME_DLL
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue