[ioquake3] 41/50: Fix score bonus for defending the flag carrier in CTF
Simon McVittie
smcv at debian.org
Sun Jul 23 21:55:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository ioquake3.
commit c8db6c55e5f2dbf9ee908e6d09bb706281bf5c57
Author: Zack Middleton <zack at cloemail.com>
Date: Fri Jul 14 15:43:44 2017 -0500
Fix score bonus for defending the flag carrier in CTF
Fix copy-paste error in the original Quake 3 code. The wrong values
are used for v1 and v2. v2 was previously set to distance of attacker
to flag base; which should be handled already.
The game now gives defense score bonus to player when they frag an
enemy near their team's flag carrier while the player is more than
1000 units from the flag carrier.
This may also fix not giving defense bonus when near carrier due to
checking if carrier and enemy (instead of attacker) are in PVS.
Found by @Razish.
---
code/game/g_team.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/g_team.c b/code/game/g_team.c
index 7e0e90b..e736a4a 100644
--- a/code/game/g_team.c
+++ b/code/game/g_team.c
@@ -462,7 +462,7 @@ void Team_FragBonuses(gentity_t *targ, gentity_t *inflictor, gentity_t *attacker
if (carrier && carrier != attacker) {
VectorSubtract(targ->r.currentOrigin, carrier->r.currentOrigin, v1);
- VectorSubtract(attacker->r.currentOrigin, carrier->r.currentOrigin, v1);
+ VectorSubtract(attacker->r.currentOrigin, carrier->r.currentOrigin, v2);
if ( ( ( VectorLength(v1) < CTF_ATTACKER_PROTECT_RADIUS &&
trap_InPVS(carrier->r.currentOrigin, targ->r.currentOrigin ) ) ||
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list