Ah! I think I have found itā¦
The āteamā variable is the team of the player laying on the ground, so
if( team == TEAM_AXIS || team == TEAM_ALLIES ) {
allways evalutes true. (The player waiting for a revive canāt be a spectator, obviously)
Just change that check to
if( cg.snap->ps.persistant[PERS_TEAM] == TEAM_AXIS
|| cg.snap->ps.persistant[PERS_TEAM] == TEAM_ALLIES ) {
EDIT: As for showing teammates a blue icon:
Modify the code like this:
if ( cg.snap->ps.persistant[PERS_TEAM] == team ) {
if ( cg.snap->ps.stats[ STAT_PLAYER_CLASS ] == PC_MEDIC ) {
CG_PlayerFloatSprite( cent, cgs.media.medicReviveShader, 8 );
} else {
CG_PlayerFloatSprite( cent, cgs.media.needReviveShader, 8 );
}
} else {
CG_PlayerFloatSprite( cent, cgs.media.gibbableShader, 8 );
}
(Given that the blue icon variable is called āneedReviveShaderā.