mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Jawz ignores targets too high/low
This commit is contained in:
parent
be92535dba
commit
c46bf86bf3
1 changed files with 9 additions and 2 deletions
11
src/k_kart.c
11
src/k_kart.c
|
|
@ -3107,6 +3107,14 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source)
|
|||
if (G_GametypeHasTeams() && source->ctfteam == player->ctfteam)
|
||||
continue;
|
||||
|
||||
// Invisible, don't bother
|
||||
if (player->kartstuff[k_hyudorotimer])
|
||||
continue;
|
||||
|
||||
// Z pos too high/low
|
||||
if (abs(player->mo->z - (actor->z + actor->momz)) > 48<<FRACBITS)
|
||||
continue;
|
||||
|
||||
// Find the angle, see who's got the best.
|
||||
thisang = actor->angle - R_PointToAngle2(actor->x, actor->y, player->mo->x, player->mo->y);
|
||||
if (thisang > ANGLE_180)
|
||||
|
|
@ -3134,8 +3142,7 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source)
|
|||
if (player->kartstuff[k_bumper] <= 0)
|
||||
continue;
|
||||
|
||||
thisdist = P_AproxDistance(P_AproxDistance(player->mo->x - (actor->x + actor->momx),
|
||||
player->mo->y - (actor->y + actor->momy)), player->mo->z - (actor->z + actor->momz));
|
||||
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
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue