mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
More Jawz tweaking
- Z pos checking is Battle-only now - Made the Z pos limit much higher - Increased its range in Battle
This commit is contained in:
parent
8866bd9818
commit
0d5aaa65c6
1 changed files with 5 additions and 5 deletions
10
src/k_kart.c
10
src/k_kart.c
|
|
@ -3209,10 +3209,6 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source)
|
||||||
if (player->kartstuff[k_hyudorotimer])
|
if (player->kartstuff[k_hyudorotimer])
|
||||||
continue;
|
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.
|
// Find the angle, see who's got the best.
|
||||||
thisang = actor->angle - R_PointToAngle2(actor->x, actor->y, player->mo->x, player->mo->y);
|
thisang = actor->angle - R_PointToAngle2(actor->x, actor->y, player->mo->x, player->mo->y);
|
||||||
if (thisang > ANGLE_180)
|
if (thisang > ANGLE_180)
|
||||||
|
|
@ -3240,9 +3236,13 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source)
|
||||||
if (player->kartstuff[k_bumper] <= 0)
|
if (player->kartstuff[k_bumper] <= 0)
|
||||||
continue;
|
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));
|
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;
|
continue;
|
||||||
|
|
||||||
thisavg = (AngleFixed(thisang) + thisdist) / 2;
|
thisavg = (AngleFixed(thisang) + thisdist) / 2;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue