From 0448f68a13c53efd17a8ef04d4a6b3e01a12bef6 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 23 May 2013 00:55:32 -0500 Subject: [PATCH] Fix predicting touching items in CTF and 1FCTF In CTF, rail or plasma gun/ammo were not predicted for pickup depending on what team player is on. The rail and plasma values are the same as PW_REDFLAG and PW_BLUEFLAG. In 1FCTF, only neutral flag, BFG, and BFG ammo were predicted for pickup. WP_BFG is equal to PW_NEUTRALFLAG. --- code/cgame/cg_predict.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/cgame/cg_predict.c b/code/cgame/cg_predict.c index acdfe59d..de33e4c9 100644 --- a/code/cgame/cg_predict.c +++ b/code/cgame/cg_predict.c @@ -283,17 +283,17 @@ static void CG_TouchItem( centity_t *cent ) { // We don't predict touching our own flag #ifdef MISSIONPACK if( cgs.gametype == GT_1FCTF ) { - if( item->giTag != PW_NEUTRALFLAG ) { + if( item->giType == IT_TEAM && item->giTag != PW_NEUTRALFLAG ) { return; } } #endif if( cgs.gametype == GT_CTF ) { if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_RED && - item->giTag == PW_REDFLAG) + item->giType == IT_TEAM && item->giTag == PW_REDFLAG) return; if (cg.predictedPlayerState.persistant[PERS_TEAM] == TEAM_BLUE && - item->giTag == PW_BLUEFLAG) + item->giType == IT_TEAM && item->giTag == PW_BLUEFLAG) return; }