rename CLASS_<ff class> to FF_CLASS_<class> to avoid confusion with Classify enums

This commit is contained in:
Dexter 2013-11-05 01:25:34 +00:00 committed by squeek
parent 6deedf45a1
commit c26dad0a15
3 changed files with 38 additions and 38 deletions

View file

@ -26,18 +26,18 @@ typedef enum
typedef enum
{
CLASS_UNASSIGNED = 0,
CLASS_SCOUT,
CLASS_SNIPER,
CLASS_SOLDIER,
CLASS_DEMOMAN,
CLASS_MEDIC,
CLASS_HWGUY,
CLASS_PYRO,
CLASS_SPY,
CLASS_ENGINEER,
CLASS_CIVILIAN,
CLASS_COUNT
FF_CLASS_UNASSIGNED = 0,
FF_CLASS_SCOUT,
FF_CLASS_SNIPER,
FF_CLASS_SOLDIER,
FF_CLASS_DEMOMAN,
FF_CLASS_MEDIC,
FF_CLASS_HWGUY,
FF_CLASS_PYRO,
FF_CLASS_SPY,
FF_CLASS_ENGINEER,
FF_CLASS_CIVILIAN,
FF_CLASS_COUNT
} FF_CLASS;
#endif // FF_SH_SHAREDDEFS_H

View file

@ -44,16 +44,16 @@ static void ClassRestrictionChange( IConVar *var, const char *pOldString, float
int idx = -1;
const char *cvarName = conVar->GetName();
if (FStrEq(cvarName, "cr_scout")) idx = CLASS_SCOUT;
else if (FStrEq(cvarName, "cr_sniper")) idx = CLASS_SNIPER;
else if (FStrEq(cvarName, "cr_soldier")) idx = CLASS_SOLDIER;
else if (FStrEq(cvarName, "cr_demoman")) idx = CLASS_DEMOMAN;
else if (FStrEq(cvarName, "cr_medic")) idx = CLASS_MEDIC;
else if (FStrEq(cvarName, "cr_hwguy")) idx = CLASS_HWGUY;
else if (FStrEq(cvarName, "cr_pyro")) idx = CLASS_PYRO;
else if (FStrEq(cvarName, "cr_spy")) idx = CLASS_SPY;
else if (FStrEq(cvarName, "cr_engineer")) idx = CLASS_ENGINEER;
else if (FStrEq(cvarName, "cr_civilian")) idx = CLASS_CIVILIAN;
if (FStrEq(cvarName, "cr_scout")) idx = FF_CLASS_SCOUT;
else if (FStrEq(cvarName, "cr_sniper")) idx = FF_CLASS_SNIPER;
else if (FStrEq(cvarName, "cr_soldier")) idx = FF_CLASS_SOLDIER;
else if (FStrEq(cvarName, "cr_demoman")) idx = FF_CLASS_DEMOMAN;
else if (FStrEq(cvarName, "cr_medic")) idx = FF_CLASS_MEDIC;
else if (FStrEq(cvarName, "cr_hwguy")) idx = FF_CLASS_HWGUY;
else if (FStrEq(cvarName, "cr_pyro")) idx = FF_CLASS_PYRO;
else if (FStrEq(cvarName, "cr_spy")) idx = FF_CLASS_SPY;
else if (FStrEq(cvarName, "cr_engineer")) idx = FF_CLASS_ENGINEER;
else if (FStrEq(cvarName, "cr_civilian")) idx = FF_CLASS_CIVILIAN;
pTeam->UpdateClassLimit( idx, conVar->GetInt() );
}
@ -149,16 +149,16 @@ void CFF_SH_TeamManager::UpdateClassLimit( int iClassIdx )
ConVar *conVar = NULL;
switch ( iClassIdx )
{
case CLASS_SCOUT: conVar = &cr_scout; break;
case CLASS_SNIPER: conVar = &cr_sniper; break;
case CLASS_SOLDIER: conVar = &cr_soldier; break;
case CLASS_DEMOMAN: conVar = &cr_demoman; break;
case CLASS_MEDIC: conVar = &cr_medic; break;
case CLASS_HWGUY: conVar = &cr_hwguy; break;
case CLASS_PYRO: conVar = &cr_pyro; break;
case CLASS_SPY: conVar = &cr_spy; break;
case CLASS_ENGINEER: conVar = &cr_engineer; break;
case CLASS_CIVILIAN: conVar = &cr_civilian; break;
case FF_CLASS_SCOUT: conVar = &cr_scout; break;
case FF_CLASS_SNIPER: conVar = &cr_sniper; break;
case FF_CLASS_SOLDIER: conVar = &cr_soldier; break;
case FF_CLASS_DEMOMAN: conVar = &cr_demoman; break;
case FF_CLASS_MEDIC: conVar = &cr_medic; break;
case FF_CLASS_HWGUY: conVar = &cr_hwguy; break;
case FF_CLASS_PYRO: conVar = &cr_pyro; break;
case FF_CLASS_SPY: conVar = &cr_spy; break;
case FF_CLASS_ENGINEER: conVar = &cr_engineer; break;
case FF_CLASS_CIVILIAN: conVar = &cr_civilian; break;
default: return;
}
@ -205,7 +205,7 @@ int CFF_SH_TeamManager::GetAllies( void )
int CFF_SH_TeamManager::GetClassLimit ( int iClass )
{
if ( iClass < 0 || iClass > CLASS_COUNT )
if ( iClass < 0 || iClass > FF_CLASS_COUNT )
return -1;
#ifdef CLIENT_DLL
return m_iClasses[iClass];

View file

@ -35,15 +35,15 @@ class CFF_SH_TeamManager : public CTeam
public:
// variables
#ifdef GAME_DLL
int m_iClassesMap[CLASS_COUNT]; // this is just the map limits
int m_iClassesMap[FF_CLASS_COUNT]; // this is just the map limits
CNetworkVar( int, m_iAllies );
CNetworkVar( int, m_iFortPoints );
CNetworkArray( int, m_iClasses, CLASS_COUNT ); // this is the actual limit, needed by the client
CNetworkArray( int, m_iClasses, FF_CLASS_COUNT ); // this is the actual limit, needed by the client
CNetworkVar( int, m_iMaxPlayers );
#else
int m_iAllies;
int m_iFortPoints;
int m_iClasses[CLASS_COUNT];
int m_iClasses[FF_CLASS_COUNT];
int m_iMaxPlayers;
#endif