From 5f2e4a03c56f916a32c0364ca71c0ef9e004299a Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Fri, 14 Jul 2017 17:38:22 -0500 Subject: [PATCH] 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. --- code/game/g_team.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/game/g_team.c b/code/game/g_team.c index de81e52f..0f5a34c5 100644 --- a/code/game/g_team.c +++ b/code/game/g_team.c @@ -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)