mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Flip side properly for objects to go towards.
This commit is contained in:
parent
00227ee7f0
commit
ebaef5d0af
1 changed files with 10 additions and 0 deletions
|
|
@ -861,6 +861,16 @@ void K_NudgePredictionTowardsObjects(botprediction_t *predict, player_t *player)
|
||||||
predict->y += FixedMul(nudgeDist, FINESINE(nudgeDir >> ANGLETOFINESHIFT));
|
predict->y += FixedMul(nudgeDist, FINESINE(nudgeDir >> ANGLETOFINESHIFT));
|
||||||
|
|
||||||
distToPredict = R_PointToDist2(player->mo->x, player->mo->y, predict->x, predict->y);
|
distToPredict = R_PointToDist2(player->mo->x, player->mo->y, predict->x, predict->y);
|
||||||
|
|
||||||
|
// Flip side, since we want to check for objects to steer towards on the side we're NOT dodging.
|
||||||
|
if (gotoSide == 0)
|
||||||
|
{
|
||||||
|
gotoSide = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gotoSide = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gotoSide == -1)
|
if (gotoSide == -1)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue