fix: nav: overlap between occupied node check and player avoid distance

fix: bot: debug overlay flickering in some situations
This commit is contained in:
jeefo 2023-07-06 14:00:48 +03:00
commit 7a7a9c3146
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
5 changed files with 14 additions and 10 deletions

View file

@ -3044,7 +3044,7 @@ bool Bot::isOccupiedNode (int index, bool needZeroVelocity) {
}
const auto length = client.origin.distanceSq (graph[index].origin);
if (length < cr::clamp (cr::sqrf (graph[index].radius) * 2.0f, cr::sqrf (40.0f), cr::sqrf (90.0f))) {
if (length < cr::clamp (cr::sqrf (graph[index].radius) * 2.0f, cr::sqrf (90.0f), cr::sqrf (120.0f))) {
return true;
}
auto bot = bots[client.ent];