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.
This commit is contained in:
Zack Middleton 2013-05-23 00:55:32 -05:00
parent 53bbfc2cd6
commit 0448f68a13

View file

@ -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;
}