mirror of
https://github.com/fortressforever/fortressforever-2013.git
synced 2024-11-13 00:24:20 +00:00
rename CLASS_<ff class> to FF_CLASS_<class> to avoid confusion with Classify enums
This commit is contained in:
parent
6deedf45a1
commit
c26dad0a15
3 changed files with 38 additions and 38 deletions
|
@ -26,18 +26,18 @@ typedef enum
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
CLASS_UNASSIGNED = 0,
|
FF_CLASS_UNASSIGNED = 0,
|
||||||
CLASS_SCOUT,
|
FF_CLASS_SCOUT,
|
||||||
CLASS_SNIPER,
|
FF_CLASS_SNIPER,
|
||||||
CLASS_SOLDIER,
|
FF_CLASS_SOLDIER,
|
||||||
CLASS_DEMOMAN,
|
FF_CLASS_DEMOMAN,
|
||||||
CLASS_MEDIC,
|
FF_CLASS_MEDIC,
|
||||||
CLASS_HWGUY,
|
FF_CLASS_HWGUY,
|
||||||
CLASS_PYRO,
|
FF_CLASS_PYRO,
|
||||||
CLASS_SPY,
|
FF_CLASS_SPY,
|
||||||
CLASS_ENGINEER,
|
FF_CLASS_ENGINEER,
|
||||||
CLASS_CIVILIAN,
|
FF_CLASS_CIVILIAN,
|
||||||
CLASS_COUNT
|
FF_CLASS_COUNT
|
||||||
} FF_CLASS;
|
} FF_CLASS;
|
||||||
|
|
||||||
#endif // FF_SH_SHAREDDEFS_H
|
#endif // FF_SH_SHAREDDEFS_H
|
|
@ -44,16 +44,16 @@ static void ClassRestrictionChange( IConVar *var, const char *pOldString, float
|
||||||
int idx = -1;
|
int idx = -1;
|
||||||
const char *cvarName = conVar->GetName();
|
const char *cvarName = conVar->GetName();
|
||||||
|
|
||||||
if (FStrEq(cvarName, "cr_scout")) idx = CLASS_SCOUT;
|
if (FStrEq(cvarName, "cr_scout")) idx = FF_CLASS_SCOUT;
|
||||||
else if (FStrEq(cvarName, "cr_sniper")) idx = CLASS_SNIPER;
|
else if (FStrEq(cvarName, "cr_sniper")) idx = FF_CLASS_SNIPER;
|
||||||
else if (FStrEq(cvarName, "cr_soldier")) idx = CLASS_SOLDIER;
|
else if (FStrEq(cvarName, "cr_soldier")) idx = FF_CLASS_SOLDIER;
|
||||||
else if (FStrEq(cvarName, "cr_demoman")) idx = CLASS_DEMOMAN;
|
else if (FStrEq(cvarName, "cr_demoman")) idx = FF_CLASS_DEMOMAN;
|
||||||
else if (FStrEq(cvarName, "cr_medic")) idx = CLASS_MEDIC;
|
else if (FStrEq(cvarName, "cr_medic")) idx = FF_CLASS_MEDIC;
|
||||||
else if (FStrEq(cvarName, "cr_hwguy")) idx = CLASS_HWGUY;
|
else if (FStrEq(cvarName, "cr_hwguy")) idx = FF_CLASS_HWGUY;
|
||||||
else if (FStrEq(cvarName, "cr_pyro")) idx = CLASS_PYRO;
|
else if (FStrEq(cvarName, "cr_pyro")) idx = FF_CLASS_PYRO;
|
||||||
else if (FStrEq(cvarName, "cr_spy")) idx = CLASS_SPY;
|
else if (FStrEq(cvarName, "cr_spy")) idx = FF_CLASS_SPY;
|
||||||
else if (FStrEq(cvarName, "cr_engineer")) idx = CLASS_ENGINEER;
|
else if (FStrEq(cvarName, "cr_engineer")) idx = FF_CLASS_ENGINEER;
|
||||||
else if (FStrEq(cvarName, "cr_civilian")) idx = CLASS_CIVILIAN;
|
else if (FStrEq(cvarName, "cr_civilian")) idx = FF_CLASS_CIVILIAN;
|
||||||
|
|
||||||
pTeam->UpdateClassLimit( idx, conVar->GetInt() );
|
pTeam->UpdateClassLimit( idx, conVar->GetInt() );
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ LINK_ENTITY_TO_CLASS( ff_team_manager, CFF_SH_TeamManager );
|
||||||
IMPLEMENT_SERVERCLASS_ST( CFF_SH_TeamManager, DT_FFTeamManager )
|
IMPLEMENT_SERVERCLASS_ST( CFF_SH_TeamManager, DT_FFTeamManager )
|
||||||
SendPropInt( SENDINFO( m_iAllies ) ),
|
SendPropInt( SENDINFO( m_iAllies ) ),
|
||||||
SendPropInt( SENDINFO( m_iFortPoints ) ),
|
SendPropInt( SENDINFO( m_iFortPoints ) ),
|
||||||
SendPropArray3( SENDINFO_ARRAY3(m_iClasses), SendPropInt( SENDINFO_ARRAY(m_iClasses), 4 ) ),
|
SendPropArray3( SENDINFO_ARRAY3( m_iClasses ), SendPropInt( SENDINFO_ARRAY( m_iClasses ), 4 ) ),
|
||||||
SendPropInt( SENDINFO( m_iMaxPlayers ) ),
|
SendPropInt( SENDINFO( m_iMaxPlayers ) ),
|
||||||
//SendPropString( SENDINFO( m_szTeamname ) ), already done in base data table
|
//SendPropString( SENDINFO( m_szTeamname ) ), already done in base data table
|
||||||
SendPropInt( SENDINFO( m_iDeaths ) ),
|
SendPropInt( SENDINFO( m_iDeaths ) ),
|
||||||
|
@ -78,7 +78,7 @@ END_SEND_TABLE()
|
||||||
IMPLEMENT_CLIENTCLASS_DT( CFF_CL_TeamManager, DT_FFTeamManager, CFF_SV_TeamManager )
|
IMPLEMENT_CLIENTCLASS_DT( CFF_CL_TeamManager, DT_FFTeamManager, CFF_SV_TeamManager )
|
||||||
RecvPropInt( RECVINFO( m_iAllies ) ),
|
RecvPropInt( RECVINFO( m_iAllies ) ),
|
||||||
RecvPropInt( RECVINFO( m_iFortPoints ) ),
|
RecvPropInt( RECVINFO( m_iFortPoints ) ),
|
||||||
RecvPropArray3( RECVINFO_ARRAY(m_iClasses), RecvPropInt( RECVINFO(m_iClasses[0]))),
|
RecvPropArray3( RECVINFO_ARRAY(m_iClasses), RecvPropInt( RECVINFO( m_iClasses[0] ) ) ),
|
||||||
RecvPropInt( RECVINFO( m_iMaxPlayers ) ),
|
RecvPropInt( RECVINFO( m_iMaxPlayers ) ),
|
||||||
//RecvPropString( RECVINFO( m_szTeamname ) ), already done in base data table
|
//RecvPropString( RECVINFO( m_szTeamname ) ), already done in base data table
|
||||||
RecvPropInt( RECVINFO( m_iDeaths ) ),
|
RecvPropInt( RECVINFO( m_iDeaths ) ),
|
||||||
|
@ -149,16 +149,16 @@ void CFF_SH_TeamManager::UpdateClassLimit( int iClassIdx )
|
||||||
ConVar *conVar = NULL;
|
ConVar *conVar = NULL;
|
||||||
switch ( iClassIdx )
|
switch ( iClassIdx )
|
||||||
{
|
{
|
||||||
case CLASS_SCOUT: conVar = &cr_scout; break;
|
case FF_CLASS_SCOUT: conVar = &cr_scout; break;
|
||||||
case CLASS_SNIPER: conVar = &cr_sniper; break;
|
case FF_CLASS_SNIPER: conVar = &cr_sniper; break;
|
||||||
case CLASS_SOLDIER: conVar = &cr_soldier; break;
|
case FF_CLASS_SOLDIER: conVar = &cr_soldier; break;
|
||||||
case CLASS_DEMOMAN: conVar = &cr_demoman; break;
|
case FF_CLASS_DEMOMAN: conVar = &cr_demoman; break;
|
||||||
case CLASS_MEDIC: conVar = &cr_medic; break;
|
case FF_CLASS_MEDIC: conVar = &cr_medic; break;
|
||||||
case CLASS_HWGUY: conVar = &cr_hwguy; break;
|
case FF_CLASS_HWGUY: conVar = &cr_hwguy; break;
|
||||||
case CLASS_PYRO: conVar = &cr_pyro; break;
|
case FF_CLASS_PYRO: conVar = &cr_pyro; break;
|
||||||
case CLASS_SPY: conVar = &cr_spy; break;
|
case FF_CLASS_SPY: conVar = &cr_spy; break;
|
||||||
case CLASS_ENGINEER: conVar = &cr_engineer; break;
|
case FF_CLASS_ENGINEER: conVar = &cr_engineer; break;
|
||||||
case CLASS_CIVILIAN: conVar = &cr_civilian; break;
|
case FF_CLASS_CIVILIAN: conVar = &cr_civilian; break;
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ int CFF_SH_TeamManager::GetAllies( void )
|
||||||
|
|
||||||
int CFF_SH_TeamManager::GetClassLimit ( int iClass )
|
int CFF_SH_TeamManager::GetClassLimit ( int iClass )
|
||||||
{
|
{
|
||||||
if ( iClass < 0 || iClass > CLASS_COUNT )
|
if ( iClass < 0 || iClass > FF_CLASS_COUNT )
|
||||||
return -1;
|
return -1;
|
||||||
#ifdef CLIENT_DLL
|
#ifdef CLIENT_DLL
|
||||||
return m_iClasses[iClass];
|
return m_iClasses[iClass];
|
||||||
|
|
|
@ -35,15 +35,15 @@ class CFF_SH_TeamManager : public CTeam
|
||||||
public:
|
public:
|
||||||
// variables
|
// variables
|
||||||
#ifdef GAME_DLL
|
#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_iAllies );
|
||||||
CNetworkVar( int, m_iFortPoints );
|
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 );
|
CNetworkVar( int, m_iMaxPlayers );
|
||||||
#else
|
#else
|
||||||
int m_iAllies;
|
int m_iAllies;
|
||||||
int m_iFortPoints;
|
int m_iFortPoints;
|
||||||
int m_iClasses[CLASS_COUNT];
|
int m_iClasses[FF_CLASS_COUNT];
|
||||||
int m_iMaxPlayers;
|
int m_iMaxPlayers;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue