mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
If already on a shortcut, bots can continue to use shortcut waypoints
This commit is contained in:
parent
d0a6c43c89
commit
cc286fc810
1 changed files with 11 additions and 4 deletions
15
src/k_kart.c
15
src/k_kart.c
|
|
@ -6488,11 +6488,18 @@ static waypoint_t *K_GetPlayerNextWaypoint(player_t *player)
|
|||
{
|
||||
for (i = 0U; i < waypoint->numnextwaypoints; i++)
|
||||
{
|
||||
if (K_PlayerUsesBotMovement(player)
|
||||
&& K_GetWaypointIsShortcut(waypoint->nextwaypoints[i])
|
||||
&& !K_BotCanTakeCut(player))
|
||||
if (K_PlayerUsesBotMovement(player) == true
|
||||
&& K_GetWaypointIsShortcut(waypoint->nextwaypoints[i]) == true
|
||||
&& K_BotCanTakeCut(player) == false)
|
||||
{
|
||||
continue;
|
||||
// Bots that aren't able to take a shortcut will ignore shortcut waypoints.
|
||||
// (However, if they're already on a shortcut, then we want them to keep going.)
|
||||
|
||||
if (player->nextwaypoint == NULL
|
||||
|| K_GetWaypointIsShortcut(player->nextwaypoint) == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
angletowaypoint = R_PointToAngle2(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue