From 3520a3fb55780a52301be470cc8df9bb325b9687 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Thu, 6 Sep 2018 16:05:57 -0400 Subject: [PATCH] More Jawz tweaking - Z pos checking is Battle-only now - Made the Z pos limit much higher - Increased its range in Battle --- src/k_kart.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index dcb7aa26..d6218306 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -3209,10 +3209,6 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source) if (player->kartstuff[k_hyudorotimer]) continue; - // Z pos too high/low - if (abs(player->mo->z - (actor->z + actor->momz)) > 48<angle - R_PointToAngle2(actor->x, actor->y, player->mo->x, player->mo->y); if (thisang > ANGLE_180) @@ -3240,9 +3236,13 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source) if (player->kartstuff[k_bumper] <= 0) continue; + // Z pos too high/low + if (abs(player->mo->z - (actor->z + actor->momz)) > RING_DIST/8) + continue; + thisdist = P_AproxDistance(player->mo->x - (actor->x + actor->momx), player->mo->y - (actor->y + actor->momy)); - if (thisdist > RING_DIST) // Don't go for people who are too far away + if (thisdist > 2*RING_DIST) // Don't go for people who are too far away continue; thisavg = (AngleFixed(thisang) + thisdist) / 2;