Skip to content

Commit

Permalink
Fix predicting touching items in CTF and 1FCTF
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed May 23, 2013
1 parent 53bbfc2 commit 0448f68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/cgame/cg_predict.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0448f68

Please sign in to comment.