diff options
author | Tim Angus <tim@ngus.net> | 2009-10-03 11:41:24 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:14 +0000 |
commit | 614a658030e59212335611596adb196b93e5b437 (patch) | |
tree | b627256cb9b7f4d8c55490111a149d059da5053d /src/cgame | |
parent | ea433462e65a861b7123942151e882954f55f052 (diff) |
* Merge clientSession_t::sessionTeam and clientSession_t::spectatorState
* Remove existing team_t (TEAM_FREE, TEAM_SPECTATOR)
* s/pTeam_t/team_t/;s/buildableTeam_t/team_t/;s/WUTeam_t/team_t/
* s/pClass_t/class_t/
* s/PERS_TEAM/PERS_SPECSTATE/
* s/STAT_PTEAM/STAT_TEAM/;s/STAT_PCLASS/STAT_CLASS/
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_buildable.c | 24 | ||||
-rw-r--r-- | src/cgame/cg_draw.c | 56 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 14 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 4 | ||||
-rw-r--r-- | src/cgame/cg_main.c | 28 | ||||
-rw-r--r-- | src/cgame/cg_players.c | 16 | ||||
-rw-r--r-- | src/cgame/cg_playerstate.c | 6 | ||||
-rw-r--r-- | src/cgame/cg_predict.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_scanner.c | 10 | ||||
-rw-r--r-- | src/cgame/cg_servercmds.c | 16 | ||||
-rw-r--r-- | src/cgame/cg_tutorial.c | 24 | ||||
-rw-r--r-- | src/cgame/cg_view.c | 20 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 6 |
13 files changed, 113 insertions, 113 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 7b20b8b8..ae0ed17e 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -373,7 +373,7 @@ void CG_InitBuildables( void ) else { //file doesn't exist - use default - if( BG_FindTeamForBuildable( i ) == BIT_ALIENS ) + if( BG_FindTeamForBuildable( i ) == TEAM_ALIENS ) cg_buildables[ i ].sounds[ j ].sound = defaultAlienSounds[ j ]; else cg_buildables[ i ].sounds[ j ].sound = defaultHumanSounds[ j ]; @@ -629,14 +629,14 @@ CG_BuildableParticleEffects static void CG_BuildableParticleEffects( centity_t *cent ) { entityState_t *es = ¢->currentState; - buildableTeam_t team = BG_FindTeamForBuildable( es->modelindex ); + team_t team = BG_FindTeamForBuildable( es->modelindex ); int health = es->generic1 & B_HEALTH_MASK; float healthFrac = (float)health / B_HEALTH_MASK; if( !( es->eFlags & EF_B_SPAWNED ) ) return; - if( team == BIT_HUMANS ) + if( team == TEAM_HUMANS ) { if( healthFrac < 0.33f && !CG_IsParticleSystemValid( ¢->buildablePS ) ) { @@ -651,7 +651,7 @@ static void CG_BuildableParticleEffects( centity_t *cent ) else if( healthFrac >= 0.33f && CG_IsParticleSystemValid( ¢->buildablePS ) ) CG_DestroyParticleSystem( ¢->buildablePS ); } - else if( team == BIT_ALIENS ) + else if( team == TEAM_ALIENS ) { if( healthFrac < 0.33f && !CG_IsParticleSystemValid( ¢->buildablePS ) ) { @@ -838,7 +838,7 @@ static void CG_BuildableStatusDisplay( centity_t *cent ) entityState_t *hit; int anim; - if( BG_FindTeamForBuildable( es->modelindex ) == BIT_ALIENS ) + if( BG_FindTeamForBuildable( es->modelindex ) == TEAM_ALIENS ) bs = &cgs.alienBuildStat; else bs = &cgs.humanBuildStat; @@ -916,7 +916,7 @@ static void CG_BuildableStatusDisplay( centity_t *cent ) } // hack to make the kit obscure view if( cg_drawGun.integer && visible && - cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_HUMANS && + cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_HUMANS && CG_WorldToScreen( origin, &x, &y ) ) { if( x > 450 && y > 290 ) @@ -1188,13 +1188,13 @@ void CG_Buildable( centity_t *cent ) vec3_t surfNormal, xNormal, mins, maxs; vec3_t refNormal = { 0.0f, 0.0f, 1.0f }; float rotAngle; - buildableTeam_t team = BG_FindTeamForBuildable( es->modelindex ); + team_t team = BG_FindTeamForBuildable( es->modelindex ); float scale; int health; float healthScale; //must be before EF_NODRAW check - if( team == BIT_ALIENS ) + if( team == TEAM_ALIENS ) CG_Creep( cent ); // if set to invisible, skip @@ -1256,12 +1256,12 @@ void CG_Buildable( centity_t *cent ) { sfxHandle_t prebuildSound = cgs.media.humanBuildablePrebuild; - if( team == BIT_HUMANS ) + if( team == TEAM_HUMANS ) { ent.customShader = cgs.media.humanSpawningShader; prebuildSound = cgs.media.humanBuildablePrebuild; } - else if( team == BIT_ALIENS ) + else if( team == TEAM_ALIENS ) prebuildSound = cgs.media.alienBuildablePrebuild; trap_S_AddLoopingSound( es->number, cent->lerpOrigin, vec3_origin, prebuildSound ); @@ -1415,12 +1415,12 @@ void CG_Buildable( centity_t *cent ) { if( cent->lastBuildableDamageSoundTime + BUILDABLE_SOUND_PERIOD < cg.time ) { - if( team == BIT_HUMANS ) + if( team == TEAM_HUMANS ) { int i = rand( ) % 4; trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.humanBuildableDamage[ i ] ); } - else if( team == BIT_ALIENS ) + else if( team == TEAM_ALIENS ) trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.alienBuildableDamage ); cent->lastBuildableDamageSoundTime = cg.time; diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index a6302afe..a84f3730 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -316,9 +316,9 @@ static void CG_DrawPlayerCreditsValue( rectDef_t *rect, vec4_t color, qboolean p value = ps->persistant[ PERS_CREDIT ]; if( value > -1 ) { - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_ALIENS ) { - if( !BG_AlienCanEvolve( cg.predictedPlayerState.stats[ STAT_PCLASS ], + if( !BG_AlienCanEvolve( cg.predictedPlayerState.stats[ STAT_CLASS ], value, cgs.alienStage ) && cg.time - cg.lastEvolveAttempt <= NO_CREDITS_TIME && ( ( cg.time - cg.lastEvolveAttempt ) / 300 ) & 1 ) @@ -721,7 +721,7 @@ CG_DrawAlienSense */ static void CG_DrawAlienSense( rectDef_t *rect ) { - if( BG_ClassHasAbility( cg.snap->ps.stats[ STAT_PCLASS ], SCA_ALIENSENSE ) ) + if( BG_ClassHasAbility( cg.snap->ps.stats[ STAT_CLASS ], SCA_ALIENSENSE ) ) CG_AlienSense( rect ); } @@ -757,7 +757,7 @@ static void CG_DrawUsableBuildable( rectDef_t *rect, qhandle_t shader, vec4_t co es = &cg_entities[ trace.entityNum ].currentState; if( es->eType == ET_BUILDABLE && BG_FindUsableForBuildable( es->modelindex ) && - cg.predictedPlayerState.stats[ STAT_PTEAM ] == BG_FindTeamForBuildable( es->modelindex ) ) + cg.predictedPlayerState.stats[ STAT_TEAM ] == BG_FindTeamForBuildable( es->modelindex ) ) { //hack to prevent showing the usable buildable when you aren't carrying an energy weapon if( ( es->modelindex == BA_H_REACTOR || es->modelindex == BA_H_REPEATER ) && @@ -872,7 +872,7 @@ static void CG_DrawPlayerHealthCross( rectDef_t *rect, vec4_t ref_color ) shader = cgs.media.healthCross3X; else if( cg.snap->ps.stats[ STAT_STATE ] & SS_HEALING_2X ) { - if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) shader = cgs.media.healthCross2X; else shader = cgs.media.healthCrossMedkit; @@ -882,7 +882,7 @@ static void CG_DrawPlayerHealthCross( rectDef_t *rect, vec4_t ref_color ) // Pick the alpha value Vector4Copy( ref_color, color ); - if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_HUMANS && + if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS && cg.snap->ps.stats[ STAT_HEALTH ] < 10 ) { color[ 0 ] = 1.0f; @@ -1411,7 +1411,7 @@ static void CG_DrawTeamSpectators( rectDef_t *rect, float scale, int textvalign, CG_DrawTeamLabel ================== */ -static void CG_DrawTeamLabel( rectDef_t *rect, pTeam_t team, float text_x, float text_y, +static void CG_DrawTeamLabel( rectDef_t *rect, team_t team, float text_x, float text_y, vec4_t color, float scale, int textalign, int textvalign, int textStyle ) { char *t; @@ -1423,13 +1423,13 @@ static void CG_DrawTeamLabel( rectDef_t *rect, pTeam_t team, float text_x, float switch( team ) { - case PTE_ALIENS: + case TEAM_ALIENS: t = "Aliens"; if( cg.intermissionStarted ) Com_sprintf( stage, MAX_TOKEN_CHARS, "(Stage %d)", cgs.alienStage + 1 ); break; - case PTE_HUMANS: + case TEAM_HUMANS: t = "Humans"; if( cg.intermissionStarted ) Com_sprintf( stage, MAX_TOKEN_CHARS, "(Stage %d)", cgs.humanStage + 1 ); @@ -1470,10 +1470,10 @@ static void CG_DrawStageReport( rectDef_t *rect, float text_x, float text_y, if( cg.intermissionStarted ) return; - if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_NONE ) + if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_NONE ) return; - if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) { int kills = ceil( (float)(cgs.alienNextStageThreshold - cgs.alienCredits) / ALIEN_CREDITS_PER_FRAG ); if( kills < 0 ) @@ -1488,7 +1488,7 @@ static void CG_DrawStageReport( rectDef_t *rect, float text_x, float text_y, Com_sprintf( s, MAX_TOKEN_CHARS, "Stage %d, %d kills for next stage", cgs.alienStage + 1, kills ); } - else if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) + else if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) { int credits = cgs.humanNextStageThreshold - cgs.humanCredits; //having credits to next stage constantly increasing feels wrong, so @@ -2114,8 +2114,8 @@ void CG_DrawWeaponIcon( rectDef_t *rect, vec4_t color ) } } - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_ALIENS && - !BG_AlienCanEvolve( cg.predictedPlayerState.stats[ STAT_PCLASS ], + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_ALIENS && + !BG_AlienCanEvolve( cg.predictedPlayerState.stats[ STAT_CLASS ], ps->persistant[ PERS_CREDIT ], cgs.alienStage ) ) { if( cg.time - cg.lastEvolveAttempt <= NO_CREDITS_TIME ) @@ -2164,7 +2164,7 @@ static void CG_DrawCrosshair( void ) !BG_FindLongRangedForWeapon( weapon ) ) return; - if( ( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR ) || + if( ( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) || ( cg.snap->ps.stats[ STAT_STATE ] & SS_INFESTING ) || ( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) ) return; @@ -2203,7 +2203,7 @@ static void CG_ScanForCrosshairEntity( void ) trace_t trace; vec3_t start, end; int content; - pTeam_t team; + team_t team; VectorCopy( cg.refdef.vieworg, start ); VectorMA( start, 131072, cg.refdef.viewaxis[ 0 ], end ); @@ -2221,10 +2221,10 @@ static void CG_ScanForCrosshairEntity( void ) team = cgs.clientinfo[ trace.entityNum ].team; - if( cg.snap->ps.persistant[ PERS_TEAM ] != TEAM_SPECTATOR ) + if( cg.snap->ps.persistant[ PERS_SPECSTATE ] == SPECTATOR_NOT ) { //only display team names of those on the same team as this player - if( team != cg.snap->ps.stats[ STAT_PTEAM ] ) + if( team != cg.snap->ps.stats[ STAT_TEAM ] ) return; } @@ -2391,10 +2391,10 @@ void CG_OwnerDraw( float x, float y, float w, float h, float text_x, CG_DrawStageReport( &rect, text_x, text_y, color, scale, textalign, textvalign, textStyle ); break; case CG_ALIENS_SCORE_LABEL: - CG_DrawTeamLabel( &rect, PTE_ALIENS, text_x, text_y, color, scale, textalign, textvalign, textStyle ); + CG_DrawTeamLabel( &rect, TEAM_ALIENS, text_x, text_y, color, scale, textalign, textvalign, textStyle ); break; case CG_HUMANS_SCORE_LABEL: - CG_DrawTeamLabel( &rect, PTE_HUMANS, text_x, text_y, color, scale, textalign, textvalign, textStyle ); + CG_DrawTeamLabel( &rect, TEAM_HUMANS, text_x, text_y, color, scale, textalign, textvalign, textStyle ); break; //loading screen @@ -2615,7 +2615,7 @@ static void CG_DrawLighting( void ) //fade to black if stamina is low if( ( cg.snap->ps.stats[ STAT_STAMINA ] < -800 ) && - ( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) ) + ( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) ) { vec4_t black = { 0, 0, 0, 0 }; black[ 3 ] = 1.0 - ( (float)( cg.snap->ps.stats[ STAT_STAMINA ] + 1000 ) / 200.0f ); @@ -2776,9 +2776,9 @@ static void CG_DrawTeamVote( void ) vec4_t white = { 1.0f, 1.0f, 1.0f, 1.0f }; char yeskey[ 32 ], nokey[ 32 ]; - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_HUMANS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_HUMANS ) cs_offset = 0; - else if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_ALIENS ) + else if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_ALIENS ) cs_offset = 1; else return; @@ -2984,13 +2984,13 @@ static void CG_Draw2D( void ) defaultMenu = Menus_FindByName( "default_hud" ); - if( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR ) + if( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) { w = UI_Text_Width( SPECTATOR_STRING, 0.7f, 0 ); UI_Text_Paint( 320 - w / 2, 440, 0.7f, color, SPECTATOR_STRING, 0, 0, ITEM_TEXTSTYLE_SHADOWED ); } else - menu = Menus_FindByName( BG_FindHudNameForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] ) ); + menu = Menus_FindByName( BG_FindHudNameForClass( cg.predictedPlayerState.stats[ STAT_CLASS ] ) ); if( !( cg.snap->ps.stats[ STAT_STATE ] & SS_INFESTING ) && !( cg.snap->ps.stats[ STAT_STATE ] & SS_HOVELING ) && menu && @@ -3056,7 +3056,7 @@ static void CG_PainBlend( void ) float x, y, w, h; float s1, t1, s2, t2; - if( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR || cg.intermissionStarted ) + if( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT || cg.intermissionStarted ) return; damage = cg.lastHealth - cg.snap->ps.stats[ STAT_HEALTH ]; @@ -3083,9 +3083,9 @@ static void CG_PainBlend( void ) return; } - if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) VectorSet( color, 0.43f, 0.8f, 0.37f ); - else if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) + else if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) VectorSet( color, 0.8f, 0.0f, 0.0f ); if( cg.painBlendValue > cg.painBlendTarget ) diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index e4b9fb44..65f728d3 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -474,10 +474,10 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) clientInfo_t *ci; int steptime; - if( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR ) + if( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) steptime = 200; else - steptime = BG_FindSteptimeForClass( cg.snap->ps.stats[ STAT_PCLASS ] ); + steptime = BG_FindSteptimeForClass( cg.snap->ps.stats[ STAT_CLASS ] ); es = ¢->currentState; event = es->event & ~EV_EVENT_BITS; @@ -663,7 +663,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) DEBUGNAME( "EV_JUMP" ); trap_S_StartSound( NULL, es->number, CHAN_VOICE, CG_CustomSound( es->number, "*jump1.wav" ) ); - if( BG_ClassHasAbility( cg.predictedPlayerState.stats[ STAT_PCLASS ], SCA_WALLJUMPER ) ) + if( BG_ClassHasAbility( cg.predictedPlayerState.stats[ STAT_CLASS ], SCA_WALLJUMPER ) ) { vec3_t surfNormal, refNormal = { 0.0f, 0.0f, 1.0f }; vec3_t rotAxis; @@ -954,7 +954,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) case EV_OVERMIND_ATTACK: DEBUGNAME( "EV_OVERMIND_ATTACK" ); - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_ALIENS ) { trap_S_StartLocalSound( cgs.media.alienOvermindAttack, CHAN_ANNOUNCER ); CG_CenterPrint( "The Overmind is under attack!", 200, GIANTCHAR_WIDTH * 4 ); @@ -963,7 +963,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) case EV_OVERMIND_DYING: DEBUGNAME( "EV_OVERMIND_DYING" ); - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_ALIENS ) { trap_S_StartLocalSound( cgs.media.alienOvermindDying, CHAN_ANNOUNCER ); CG_CenterPrint( "The Overmind is dying!", 200, GIANTCHAR_WIDTH * 4 ); @@ -972,7 +972,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) case EV_DCC_ATTACK: DEBUGNAME( "EV_DCC_ATTACK" ); - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_HUMANS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_HUMANS ) { //trap_S_StartLocalSound( cgs.media.humanDCCAttack, CHAN_ANNOUNCER ); CG_CenterPrint( "Our base is under attack!", 200, GIANTCHAR_WIDTH * 4 ); @@ -986,7 +986,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) case EV_OVERMIND_SPAWNS: DEBUGNAME( "EV_OVERMIND_SPAWNS" ); - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_ALIENS ) { trap_S_StartLocalSound( cgs.media.alienOvermindSpawns, CHAN_ANNOUNCER ); CG_CenterPrint( "The Overmind needs spawns!", 200, GIANTCHAR_WIDTH * 4 ); diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 4f51f934..2aeaf95f 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -723,7 +723,7 @@ typedef struct qboolean infoValid; char name[ MAX_QPATH ]; - pTeam_t team; + team_t team; vec3_t color1; vec3_t color2; @@ -1653,7 +1653,7 @@ void CG_Player( centity_t *cent ); void CG_Corpse( centity_t *cent ); void CG_ResetPlayerEntity( centity_t *cent ); void CG_NewClientInfo( int clientNum ); -void CG_PrecacheClientInfo( pClass_t class, char *model, char *skin ); +void CG_PrecacheClientInfo( class_t class, char *model, char *skin ); sfxHandle_t CG_CustomSound( int clientNum, const char *soundName ); void CG_PlayerDisconnect( vec3_t org ); void CG_Bleed( vec3_t origin, vec3_t normal, int entityNum ); diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 0ac7896c..10769252 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -954,7 +954,7 @@ void CG_BuildSpectatorString( void ) for( i = 0; i < MAX_CLIENTS; i++ ) { - if( cgs.clientinfo[ i ].infoValid && cgs.clientinfo[ i ].team == PTE_NONE ) + if( cgs.clientinfo[ i ].infoValid && cgs.clientinfo[ i ].team == TEAM_NONE ) Q_strcat( cg.spectatorList, sizeof( cg.spectatorList ), va( "%s " S_COLOR_WHITE, cgs.clientinfo[ i ].name ) ); } @@ -1066,8 +1066,8 @@ int CG_PlayerCount( void ) for( i = 0; i < cg.numScores; i++ ) { - if( cg.scores[ i ].team == PTE_ALIENS || - cg.scores[ i ].team == PTE_HUMANS ) + if( cg.scores[ i ].team == TEAM_ALIENS || + cg.scores[ i ].team == TEAM_HUMANS ) count++; } @@ -1428,7 +1428,7 @@ static int CG_FeederCount( float feederID ) { for( i = 0; i < cg.numScores; i++ ) { - if( cg.scores[ i ].team == PTE_ALIENS ) + if( cg.scores[ i ].team == TEAM_ALIENS ) count++; } } @@ -1436,7 +1436,7 @@ static int CG_FeederCount( float feederID ) { for( i = 0; i < cg.numScores; i++ ) { - if( cg.scores[ i ].team == PTE_HUMANS ) + if( cg.scores[ i ].team == TEAM_HUMANS ) count++; } } @@ -1456,9 +1456,9 @@ void CG_SetScoreSelection( void *p ) for( i = 0; i < cg.numScores; i++ ) { - if( cg.scores[ i ].team == PTE_ALIENS ) + if( cg.scores[ i ].team == TEAM_ALIENS ) alien++; - else if( cg.scores[ i ].team == PTE_HUMANS ) + else if( cg.scores[ i ].team == TEAM_HUMANS ) human++; if( ps->clientNum == cg.scores[ i ].client ) @@ -1472,7 +1472,7 @@ void CG_SetScoreSelection( void *p ) feeder = FEEDER_ALIENTEAM_LIST; i = alien; - if( cg.scores[ cg.selectedScore ].team == PTE_HUMANS ) + if( cg.scores[ cg.selectedScore ].team == TEAM_HUMANS ) { feeder = FEEDER_HUMANTEAM_LIST; i = human; @@ -1515,9 +1515,9 @@ static const char *CG_FeederItemText( float feederID, int index, int column, qha *handle = -1; if( feederID == FEEDER_ALIENTEAM_LIST ) - team = PTE_ALIENS; + team = TEAM_ALIENS; else if( feederID == FEEDER_HUMANTEAM_LIST ) - team = PTE_HUMANS; + team = TEAM_HUMANS; info = CG_InfoFromScoreIndex( index, team, &scoreIndex ); sp = &cg.scores[ scoreIndex ]; @@ -1526,7 +1526,7 @@ static const char *CG_FeederItemText( float feederID, int index, int column, qha cg.intermissionStarted ) showIcons = qfalse; else if( cg.snap->ps.pm_type == PM_SPECTATOR || cg.snap->ps.pm_flags & PMF_FOLLOW || - team == cg.snap->ps.stats[ STAT_PTEAM ] || cg.intermissionStarted ) + team == cg.snap->ps.stats[ STAT_TEAM ] || cg.intermissionStarted ) showIcons = qtrue; if( info && info->infoValid ) @@ -1544,9 +1544,9 @@ static const char *CG_FeederItemText( float feederID, int index, int column, qha case 1: if( showIcons ) { - if( sp->team == PTE_HUMANS && sp->upgrade != UP_NONE ) + if( sp->team == TEAM_HUMANS && sp->upgrade != UP_NONE ) *handle = cg_upgrades[ sp->upgrade ].upgradeIcon; - else if( sp->team == PTE_ALIENS ) + else if( sp->team == TEAM_ALIENS ) { switch( sp->weapon ) { @@ -1602,7 +1602,7 @@ static qhandle_t CG_FeederItemImage( float feederID, int index ) static void CG_FeederSelection( float feederID, int index ) { int i, count; - int team = ( feederID == FEEDER_ALIENTEAM_LIST ) ? PTE_ALIENS : PTE_HUMANS; + int team = ( feederID == FEEDER_ALIENTEAM_LIST ) ? TEAM_ALIENS : TEAM_HUMANS; count = 0; for( i = 0; i < cg.numScores; i++ ) diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c index 9a7be70b..cbbc0277 100644 --- a/src/cgame/cg_players.c +++ b/src/cgame/cg_players.c @@ -628,7 +628,7 @@ static void CG_CopyClientInfoModel( clientInfo_t *from, clientInfo_t *to ) CG_GetCorpseNum ====================== */ -static int CG_GetCorpseNum( pClass_t class ) +static int CG_GetCorpseNum( class_t class ) { int i; clientInfo_t *match; @@ -695,7 +695,7 @@ static qboolean CG_ScanForExistingClientInfo( clientInfo_t *ci ) CG_PrecacheClientInfo ====================== */ -void CG_PrecacheClientInfo( pClass_t class, char *model, char *skin ) +void CG_PrecacheClientInfo( class_t class, char *model, char *skin ) { clientInfo_t *ci; clientInfo_t newInfo; @@ -1600,7 +1600,7 @@ Returns the Z component of the surface being shadowed =============== */ #define SHADOW_DISTANCE 128 -static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane, pClass_t class ) +static qboolean CG_PlayerShadow( centity_t *cent, float *shadowPlane, class_t class ) { vec3_t end, mins, maxs; trace_t trace; @@ -1667,7 +1667,7 @@ CG_PlayerSplash Draw a mark at the water surface =============== */ -static void CG_PlayerSplash( centity_t *cent, pClass_t class ) +static void CG_PlayerSplash( centity_t *cent, class_t class ) { vec3_t start, end; vec3_t mins, maxs; @@ -1858,7 +1858,7 @@ void CG_Player( centity_t *cent ) qboolean shadow = qfalse; float shadowPlane; entityState_t *es = ¢->currentState; - pClass_t class = ( es->misc >> 8 ) & 0xFF; + class_t class = ( es->misc >> 8 ) & 0xFF; float scale; vec3_t tempAxis[ 3 ], tempAxis2[ 3 ]; vec3_t angles; @@ -2367,16 +2367,16 @@ This is the spurt of blood when a character gets hit */ void CG_Bleed( vec3_t origin, vec3_t normal, int entityNum ) { - pTeam_t team = cgs.clientinfo[ entityNum ].team; + team_t team = cgs.clientinfo[ entityNum ].team; qhandle_t bleedPS; particleSystem_t *ps; if( !cg_blood.integer ) return; - if( team == PTE_ALIENS ) + if( team == TEAM_ALIENS ) bleedPS = cgs.media.alienBleedPS; - else if( team == PTE_HUMANS ) + else if( team == TEAM_HUMANS ) bleedPS = cgs.media.humanBleedPS; else return; diff --git a/src/cgame/cg_playerstate.c b/src/cgame/cg_playerstate.c index 6999e773..ba2d7359 100644 --- a/src/cgame/cg_playerstate.c +++ b/src/cgame/cg_playerstate.c @@ -248,7 +248,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) int reward; // don't play the sounds if the player just changed teams - if( ps->persistant[ PERS_TEAM ] != ops->persistant[ PERS_TEAM ] ) + if( ps->persistant[ PERS_SPECSTATE ] != ops->persistant[ PERS_SPECSTATE ] ) return; // health changes of more than -1 should make pain sounds @@ -301,7 +301,7 @@ void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) } if( cg.snap->ps.pm_type != PM_INTERMISSION && - ps->persistant[ PERS_TEAM ] != TEAM_SPECTATOR ) + ps->persistant[ PERS_SPECSTATE ] == SPECTATOR_NOT ) CG_CheckLocalSounds( ps, ops ); // run events @@ -315,7 +315,7 @@ void CG_TransitionPlayerState( playerState_t *ps, playerState_t *ops ) } // changed team - if( ps->persistant[ PERS_TEAM ] != ops->persistant[ PERS_TEAM ] ) + if( ps->stats[ STAT_TEAM ] != ops->stats[ STAT_TEAM ] ) { cg.lastHealthCross = 0; cg.chargeMeterAlpha = 0.0f; diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c index e167f0f8..5c8ef974 100644 --- a/src/cgame/cg_predict.c +++ b/src/cgame/cg_predict.c @@ -587,7 +587,7 @@ void CG_PredictPlayerState( void ) else cg_pmove.tracemask = MASK_PLAYERSOLID; - if( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR ) + if( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) cg_pmove.tracemask = MASK_DEADSOLID; // spectators can fly through bodies cg_pmove.noFootsteps = 0; diff --git a/src/cgame/cg_scanner.c b/src/cgame/cg_scanner.c index 067ca7fb..e0498b43 100644 --- a/src/cgame/cg_scanner.c +++ b/src/cgame/cg_scanner.c @@ -39,7 +39,7 @@ void CG_UpdateEntityPositions( void ) centity_t *cent = NULL; int i; - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_HUMANS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_HUMANS ) { if( entityPositions.lastUpdateTime + HUMAN_SCANNER_UPDATE_PERIOD > cg.time ) return; @@ -61,7 +61,7 @@ void CG_UpdateEntityPositions( void ) if( cent->currentState.eType == ET_BUILDABLE ) { // add to list of item positions (for creep) - if( cent->currentState.modelindex2 == BIT_ALIENS ) + if( cent->currentState.modelindex2 == TEAM_ALIENS ) { VectorCopy( cent->lerpOrigin, entityPositions.alienBuildablePos[ entityPositions.numAlienBuildables ] ); @@ -71,7 +71,7 @@ void CG_UpdateEntityPositions( void ) if( entityPositions.numAlienBuildables < MAX_GENTITIES ) entityPositions.numAlienBuildables++; } - else if( cent->currentState.modelindex2 == BIT_HUMANS ) + else if( cent->currentState.modelindex2 == TEAM_HUMANS ) { VectorCopy( cent->lerpOrigin, entityPositions.humanBuildablePos[ entityPositions.numHumanBuildables ] ); @@ -84,7 +84,7 @@ void CG_UpdateEntityPositions( void ) { int team = cent->currentState.misc & 0x00FF; - if( team == PTE_ALIENS ) + if( team == TEAM_ALIENS ) { VectorCopy( cent->lerpOrigin, entityPositions.alienClientPos[ entityPositions.numAlienClients ] ); @@ -92,7 +92,7 @@ void CG_UpdateEntityPositions( void ) if( entityPositions.numAlienClients < MAX_CLIENTS ) entityPositions.numAlienClients++; } - else if( team == PTE_HUMANS ) + else if( team == TEAM_HUMANS ) { VectorCopy( cent->lerpOrigin, entityPositions.humanClientPos[ entityPositions.numHumanClients ] ); diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 8f860072..813820f3 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -221,7 +221,7 @@ CG_AnnounceAlienStageTransistion */ static void CG_AnnounceAlienStageTransistion( stage_t from, stage_t to ) { - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] != PTE_ALIENS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] != TEAM_ALIENS ) return; trap_S_StartLocalSound( cgs.media.alienStageTransition, CHAN_ANNOUNCER ); @@ -235,7 +235,7 @@ CG_AnnounceHumanStageTransistion */ static void CG_AnnounceHumanStageTransistion( stage_t from, stage_t to ) { - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] != PTE_HUMANS ) + if( cg.predictedPlayerState.stats[ STAT_TEAM ] != TEAM_HUMANS ) return; trap_S_StartLocalSound( cgs.media.humanStageTransition, CHAN_ANNOUNCER ); @@ -459,12 +459,12 @@ void CG_Menu( int menu, int arg ) const char *dialog; dialogType_t type = 0; // controls which cg_disable var will switch it off - switch( cg.snap->ps.stats[ STAT_PTEAM ] ) + switch( cg.snap->ps.stats[ STAT_TEAM ] ) { - case PTE_ALIENS: + case TEAM_ALIENS: dialog = "menu tremulous_alien_dialog\n"; break; - case PTE_HUMANS: + case TEAM_HUMANS: dialog = "menu tremulous_human_dialog\n"; break; default: @@ -832,7 +832,7 @@ void CG_Menu( int menu, int arg ) break; case MN_A_INFEST: - trap_Cvar_Set( "ui_currentClass", va( "%d %d", cg.snap->ps.stats[ STAT_PCLASS ], + trap_Cvar_Set( "ui_currentClass", va( "%d %d", cg.snap->ps.stats[ STAT_CLASS ], cg.snap->ps.persistant[ PERS_CREDIT ] ) ); cmd = "menu tremulous_alienupgrade\n"; type = DT_INTERACTIVE; @@ -959,9 +959,9 @@ static void CG_ServerCommand( void ) Q_strncpyz( text, CG_Argv( 1 ), MAX_SAY_TEXT ); if( Q_stricmpn( text, "[skipnotify]", 12 ) ) { - if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_ALIENS ) trap_S_StartLocalSound( cgs.media.alienTalkSound, CHAN_LOCAL_SOUND ); - else if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) + else if( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) trap_S_StartLocalSound( cgs.media.humanTalkSound, CHAN_LOCAL_SOUND ); else trap_S_StartLocalSound( cgs.media.talkSound, CHAN_LOCAL_SOUND ); diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c index 0375b3e0..03aaa59e 100644 --- a/src/cgame/cg_tutorial.c +++ b/src/cgame/cg_tutorial.c @@ -162,7 +162,7 @@ static entityState_t *CG_BuildableInRange( playerState_t *ps, float *healthFract } if( es->eType == ET_BUILDABLE && - ps->stats[ STAT_PTEAM ] == BG_FindTeamForBuildable( es->modelindex ) ) + ps->stats[ STAT_TEAM ] == BG_FindTeamForBuildable( es->modelindex ) ) return es; else return NULL; @@ -222,7 +222,7 @@ static void CG_AlienBuilderText( char *text, playerState_t *ps ) } } - if( ps->stats[ STAT_PCLASS ] == PCL_ALIEN_BUILDER0_UPG ) + if( ps->stats[ STAT_CLASS ] == PCL_ALIEN_BUILDER0_UPG ) { if( ( ps->stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT ) == BA_NONE ) { @@ -270,7 +270,7 @@ static void CG_AlienLevel1Text( char *text, playerState_t *ps ) va( "Press %s to swipe\n", CG_KeyNameForCommand( "+attack" ) ) ); - if( ps->stats[ STAT_PCLASS ] == PCL_ALIEN_LEVEL1_UPG ) + if( ps->stats[ STAT_CLASS ] == PCL_ALIEN_LEVEL1_UPG ) { Q_strcat( text, MAX_TUTORIAL_TEXT, va( "Press %s to spray poisonous gas\n", @@ -293,7 +293,7 @@ static void CG_AlienLevel2Text( char *text, playerState_t *ps ) va( "Press %s to bite\n", CG_KeyNameForCommand( "+attack" ) ) ); - if( ps->stats[ STAT_PCLASS ] == PCL_ALIEN_LEVEL2_UPG ) + if( ps->stats[ STAT_CLASS ] == PCL_ALIEN_LEVEL2_UPG ) { Q_strcat( text, MAX_TUTORIAL_TEXT, va( "Press %s to invoke an electrical attack\n", @@ -316,7 +316,7 @@ static void CG_AlienLevel3Text( char *text, playerState_t *ps ) va( "Press %s to bite\n", CG_KeyNameForCommand( "+attack" ) ) ); - if( ps->stats[ STAT_PCLASS ] == PCL_ALIEN_LEVEL3_UPG ) + if( ps->stats[ STAT_CLASS ] == PCL_ALIEN_LEVEL3_UPG ) { Q_strcat( text, MAX_TUTORIAL_TEXT, va( "Press %s to launch a projectile\n", @@ -555,7 +555,7 @@ CG_SpectatorText */ static void CG_SpectatorText( char *text, playerState_t *ps ) { - if( cgs.clientinfo[ cg.clientNum ].team != PTE_NONE ) + if( cgs.clientinfo[ cg.clientNum ].team != TEAM_NONE ) { if( ps->pm_flags & PMF_QUEUED ) Q_strcat( text, MAX_TUTORIAL_TEXT, @@ -613,14 +613,14 @@ const char *CG_TutorialText( void ) if( !cg.intermissionStarted && !cg.demoPlayback ) { - if( ps->persistant[ PERS_TEAM ] == TEAM_SPECTATOR || + if( ps->persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT || ps->pm_flags & PMF_FOLLOW ) { CG_SpectatorText( text, ps ); } else if( ps->stats[ STAT_HEALTH ] > 0 ) { - switch( ps->stats[ STAT_PCLASS ] ) + switch( ps->stats[ STAT_CLASS ] ) { case PCL_ALIEN_BUILDER0: case PCL_ALIEN_BUILDER0_UPG: @@ -659,7 +659,7 @@ const char *CG_TutorialText( void ) break; } - if( ps->stats[ STAT_PTEAM ] == PTE_ALIENS ) + if( ps->stats[ STAT_TEAM ] == TEAM_ALIENS ) { entityState_t *es = CG_BuildableInRange( ps, NULL ); @@ -671,14 +671,14 @@ const char *CG_TutorialText( void ) } else if( es && es->modelindex == BA_A_HOVEL && ( es->eFlags & EF_B_SPAWNED ) && - ( ps->stats[ STAT_PCLASS ] == PCL_ALIEN_BUILDER0 || - ps->stats[ STAT_PCLASS ] == PCL_ALIEN_BUILDER0_UPG ) ) + ( ps->stats[ STAT_CLASS ] == PCL_ALIEN_BUILDER0 || + ps->stats[ STAT_CLASS ] == PCL_ALIEN_BUILDER0_UPG ) ) { Q_strcat( text, MAX_TUTORIAL_TEXT, va( "Press %s to enter the hovel\n", CG_KeyNameForCommand( "+button7" ) ) ); } - else if( BG_AlienCanEvolve( ps->stats[ STAT_PCLASS ], + else if( BG_AlienCanEvolve( ps->stats[ STAT_CLASS ], ps->persistant[ PERS_CREDIT ], cgs.alienStage ) ) { diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index f18773c0..15b9bc06 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -353,7 +353,7 @@ static void CG_StepOffset( void ) BG_GetClientNormal( ps, normal ); - steptime = BG_FindSteptimeForClass( ps->stats[ STAT_PCLASS ] ); + steptime = BG_FindSteptimeForClass( ps->stats[ STAT_CLASS ] ); // smooth out stair climbing timeDelta = cg.time - cg.stepTime; @@ -457,10 +457,10 @@ static void CG_OffsetFirstPersonView( void ) // add angles based on bob // bob amount is class dependant - if( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR ) + if( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) bob2 = 0.0f; else - bob2 = BG_FindBobForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] ); + bob2 = BG_FindBobForClass( cg.predictedPlayerState.stats[ STAT_CLASS ] ); #define LEVEL4_FEEDBACK 10.0f @@ -596,7 +596,7 @@ static void CG_OffsetFirstPersonView( void ) } // this *feels* more realisitic for humans - if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_HUMANS && + if( cg.predictedPlayerState.stats[ STAT_TEAM ] == TEAM_HUMANS && ( cg.predictedPlayerState.pm_type == PM_NORMAL || cg.predictedPlayerState.pm_type == PM_JETPACK ) ) { @@ -691,7 +691,7 @@ static int CG_CalcFov( void ) trap_GetUserCmd( cmdNum, &cmd ); if( cg.predictedPlayerState.pm_type == PM_INTERMISSION || - ( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_SPECTATOR ) ) + ( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) ) { // if in intermission, use a fixed value fov_x = 90; @@ -699,7 +699,7 @@ static int CG_CalcFov( void ) else { // don't lock the fov globally - we need to be able to change it - attribFov = BG_FindFovForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] ); + attribFov = BG_FindFovForClass( cg.predictedPlayerState.stats[ STAT_CLASS ] ); fov_x = attribFov; if ( fov_x < 1 ) @@ -708,7 +708,7 @@ static int CG_CalcFov( void ) fov_x = 160; if( cg.spawnTime > ( cg.time - FOVWARPTIME ) && - BG_ClassHasAbility( cg.predictedPlayerState.stats[ STAT_PCLASS ], SCA_FOVWARPS ) ) + BG_ClassHasAbility( cg.predictedPlayerState.stats[ STAT_CLASS ], SCA_FOVWARPS ) ) { float temp, temp2; @@ -1079,16 +1079,16 @@ static int CG_CalcViewValues( void ) VectorCopy( ps->origin, cg.refdef.vieworg ); - if( BG_ClassHasAbility( ps->stats[ STAT_PCLASS ], SCA_WALLCLIMBER ) ) + if( BG_ClassHasAbility( ps->stats[ STAT_CLASS ], SCA_WALLCLIMBER ) ) CG_smoothWWTransitions( ps, ps->viewangles, cg.refdefViewAngles ); - else if( BG_ClassHasAbility( ps->stats[ STAT_PCLASS ], SCA_WALLJUMPER ) ) + else if( BG_ClassHasAbility( ps->stats[ STAT_CLASS ], SCA_WALLJUMPER ) ) CG_smoothWJTransitions( ps, ps->viewangles, cg.refdefViewAngles ); else VectorCopy( ps->viewangles, cg.refdefViewAngles ); //clumsy logic, but it needs to be this way round because the CS propogation //delay screws things up otherwise - if( !BG_ClassHasAbility( ps->stats[ STAT_PCLASS ], SCA_WALLJUMPER ) ) + if( !BG_ClassHasAbility( ps->stats[ STAT_CLASS ], SCA_WALLJUMPER ) ) { if( !( ps->stats[ STAT_STATE ] & SS_WALLCLIMBING ) ) VectorSet( cg.lastNormal, 0.0f, 0.0f, 1.0f ); diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 0f72a378..3b0d6f2f 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -868,7 +868,7 @@ static void CG_CalculateWeaponPosition( vec3_t origin, vec3_t angles ) // gun angles from bobbing // bob amount is class dependant - bob = BG_FindBobForClass( cg.predictedPlayerState.stats[ STAT_PCLASS ] ); + bob = BG_FindBobForClass( cg.predictedPlayerState.stats[ STAT_CLASS ] ); if( bob != 0 ) { @@ -1022,7 +1022,7 @@ void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent // Lucifer cannon charge warning beep if( weaponNum == WP_LUCIFER_CANNON && ( cent->currentState.eFlags & EF_WARN_CHARGE ) && - cg.snap->ps.stats[ STAT_PTEAM ] != PTE_ALIENS ) + cg.snap->ps.stats[ STAT_TEAM ] != TEAM_ALIENS ) { trap_S_AddLoopingSound( cent->currentState.number, cent->lerpOrigin, vec3_origin, ps ? cgs.media.lCannonWarningSound : @@ -1163,7 +1163,7 @@ void CG_AddViewWeapon( playerState_t *ps ) wi = &cg_weapons[ weapon ]; cent = &cg.predictedPlayerEntity; // &cg_entities[cg.snap->ps.clientNum]; - if( ( ps->persistant[PERS_TEAM] == TEAM_SPECTATOR ) || + if( ( ps->persistant[PERS_SPECSTATE] != SPECTATOR_NOT ) || ( ps->stats[ STAT_STATE ] & SS_INFESTING ) || ( ps->stats[ STAT_STATE ] & SS_HOVELING ) ) return; |