aim: reducec headshot pct, if bot is too highskilled

aim: new cpu-friendly headshot penetration function (yb_shoots_thru_walls 3). still testing
nav: use more high range for checking occupied point.
nav: if last navigation node is used by someone, assume route ended
This commit is contained in:
jeefo 2023-04-02 14:13:52 +03:00
commit 9ddcef2dd4
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
4 changed files with 76 additions and 13 deletions

View file

@ -925,7 +925,7 @@ bool Bot::updateNavigation () {
getTask ()->data = kInvalidNodeIndex;
clearSearchNodes ();
return false;
return true;
}
if (nodeDistance < desiredDistance) {
@ -3220,7 +3220,7 @@ bool Bot::isOccupiedNode (int index, bool needZeroVelocity) {
}
auto length = client.origin.distanceSq (graph[index].origin);
if (length < cr::clamp (cr::square (graph[index].radius), cr::square (60.0f), cr::square (90.0f))) {
if (length < cr::clamp (cr::square (graph[index].radius) * 2.0f, cr::square (80.0f), cr::square (140.0f))) {
return true;
}
auto bot = bots[client.ent];