Add score bonus for defending the flag carrier in 1 Flag CTF

Set flag_pw to neutral flag instead of using CTF value for red or
blue flag so that flag carrier is detected correctly.
This commit is contained in:
Zack Middleton 2017-07-14 17:38:22 -05:00
parent 13831f9569
commit 5f2e4a03c5

View file

@ -300,6 +300,7 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker
#ifdef MISSIONPACK
if (g_gametype.integer == GT_1FCTF) {
flag_pw = PW_NEUTRALFLAG;
enemy_flag_pw = PW_NEUTRALFLAG;
}
#endif
@ -486,6 +487,12 @@ void Team_CheckHurtCarrier(gentity_t *targ, gentity_t *attacker)
else
flag_pw = PW_REDFLAG;
#ifdef MISSIONPACK
if (g_gametype.integer == GT_1FCTF) {
flag_pw = PW_NEUTRALFLAG;
}
#endif
// flags
if (targ->client->ps.powerups[flag_pw] &&
targ->client->sess.sessionTeam != attacker->client->sess.sessionTeam)