refactor UpdateLimit / UpdateLimits -> UpdateClass / UpdateAllClassLimits so its clear what it does (and matches SetClassLimit)

This commit is contained in:
Dexter 2013-11-03 23:57:31 +00:00 committed by squeek
parent 0d1b299a34
commit c9c90de4f3
2 changed files with 7 additions and 7 deletions

View file

@ -68,7 +68,7 @@ static void ClassRestrictionChange( IConVar *var, const char *pOldString, float
if ( idx == -1 )
return;
pTeam->UpdateLimit( idx );
pTeam->UpdateClassLimit( idx );
}
}
@ -143,10 +143,10 @@ void CFF_SH_TeamManager::SetClassLimit( int iClass, int iLimit )
return;
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
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 );
}
void CFF_SH_TeamManager::UpdateAllLimits( void )
void CFF_SH_TeamManager::UpdateAllClassLimits( void )
{
for ( int i = 0; i < ARRAYSIZE(m_iClassesMap); i++ )
UpdateLimit( i );
UpdateClassLimit( i );
}
void CFF_SH_TeamManager::SetDeaths( int iDeaths )

View file

@ -58,8 +58,8 @@ public:
void SetName( const char *pName );
void SetFortPoints( int iFortPoints );
void SetTeamLimits( int );
void UpdateLimit( int idx );
void UpdateAllLimits( void );
void UpdateClassLimit( int idx );
void UpdateAllClassLimits( void );
#endif // GAME_DLL