mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Polish up Jawz target conditions slightly
This commit is contained in:
parent
bbec083d4e
commit
13e94dfee0
1 changed files with 9 additions and 9 deletions
18
src/k_kart.c
18
src/k_kart.c
|
|
@ -7151,6 +7151,8 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source, angle_t range)
|
|||
continue;
|
||||
}
|
||||
|
||||
thisdist = P_AproxDistance(player->mo->x - (actor->x + actor->momx), player->mo->y - (actor->y + actor->momy));
|
||||
|
||||
if (gametyperules & GTR_CIRCUIT)
|
||||
{
|
||||
if (player->position > source->position)
|
||||
|
|
@ -7168,7 +7170,13 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source, angle_t range)
|
|||
}
|
||||
|
||||
// Z pos too high/low
|
||||
if (abs(player->mo->z - (actor->z + actor->momz)) > RING_DIST/8)
|
||||
if (abs(player->mo->z - (actor->z + actor->momz)) > FixedMul(RING_DIST/8, mapobjectscale))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Distance too far away
|
||||
if (thisdist > FixedMul(RING_DIST*2, mapobjectscale))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
@ -7183,14 +7191,6 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source, angle_t range)
|
|||
continue;
|
||||
}
|
||||
|
||||
thisdist = P_AproxDistance(player->mo->x - (actor->x + actor->momx), player->mo->y - (actor->y + actor->momy));
|
||||
|
||||
// Don't go for people who are too far away
|
||||
if (thisdist > 2*RING_DIST)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
thisScore = (AngleFixed(thisang) * 2) + (thisdist / 2);
|
||||
|
||||
//CONS_Printf("got score %f from player # %d\n", FixedToFloat(thisScore), i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue