supertuxkart / stk-code

The code base of supertuxkart
Other
4.49k stars 1.06k forks source link

Swatters may fail to select a target in FTL races #3507

Open Alayan-stk-2 opened 6 years ago

Alayan-stk-2 commented 6 years ago

In some cases (not all), the swatter doesn't try squash another kart, even if it is immediately next to the kart with the swatter and much closer to it than any other kart (so the crude "only try to squash the closest kart" is not the issue there).

I have not been able to reproduce the issue in normal races.

My best guess is that this issue is related to how a suitable target is detected.

Alayan-stk-2 commented 6 years ago

An anecdotal sight which may be relevant : after having hit a FTL leader while testing my other changes, I have seen once AI karts keeping trying to go backward well after the leader had resumed going forward.