diff --git a/reaction/cgame/cg_local.h b/reaction/cgame/cg_local.h index 0b6ad23c..d965852f 100644 --- a/reaction/cgame/cg_local.h +++ b/reaction/cgame/cg_local.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.143 2003/04/07 18:21:34 niceass +// teamplay irvision +// // Revision 1.142 2003/04/06 18:28:30 makro // SSG crosshairs // @@ -1286,6 +1289,7 @@ typedef struct { // Elder: rq3 misc shaders qhandle_t irPlayerShader; + qhandle_t irPlayerShaderFriendly; // weapon effect models qhandle_t bulletFlashModel; diff --git a/reaction/cgame/cg_main.c b/reaction/cgame/cg_main.c index 8497e4b6..2d2d01dd 100644 --- a/reaction/cgame/cg_main.c +++ b/reaction/cgame/cg_main.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.133 2003/04/07 18:21:34 niceass +// teamplay irvision +// // Revision 1.132 2003/04/06 18:28:30 makro // SSG crosshairs // @@ -2010,6 +2013,7 @@ static void CG_RegisterGraphics(void) // Elder: RQ3 misc. shaders cgs.media.irPlayerShader = trap_R_RegisterShader("powerups/irdetail"); + cgs.media.irPlayerShaderFriendly = trap_R_RegisterShader("powerups/irdetailfriendly"); cgs.media.itemStrobeShader = trap_R_RegisterShader("rq3-itemstrobe"); if (cgs.gametype == GT_CTF || cg_buildScript.integer) { diff --git a/reaction/cgame/cg_players.c b/reaction/cgame/cg_players.c index 9b726be3..2036a27b 100644 --- a/reaction/cgame/cg_players.c +++ b/reaction/cgame/cg_players.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.60 2003/04/07 18:21:34 niceass +// teamplay irvision +// // Revision 1.59 2003/04/07 11:30:10 jbravo // Forgot a skin change for reactionmale // @@ -2367,7 +2370,14 @@ void CG_AddRefEntityWithPowerups(refEntity_t * ent, entityState_t * state, int t if (state->eType == ET_PLAYER) { if ((cg.snap->ps.stats[STAT_HOLDABLE_ITEM] & (1 << HI_BANDOLIER)) && cg.rq3_irvision && !(state->eFlags & EF_DEAD)) { - ent->customShader = cgs.media.irPlayerShader; + + // NiceAss: On your team + if (cgs.gametype >= GT_TEAM && cg.snap->ps.persistant[PERS_TEAM] == cgs.clientinfo[state->clientNum].team ) + ent->customShader = cgs.media.irPlayerShaderFriendly; + // Not on your team + else + ent->customShader = cgs.media.irPlayerShader; + trap_R_AddRefEntityToScene(ent); } }