vistable: fix long-standing bug with saving vis counts

vistable: bumped version to 4, so all vistables will be rebuilded
bot: reworked bot think mechanism timers
fix: gimbal lock within bot aiming code on ladders
fix: some fixes to aiming code that prevent bots 360 degree rotations
fix: some mistakes in next and next-next node aiming when in idle state
fix: improved seek covering from attack task
nav: improved bot's crouch on marred-crouch nodes
nav: overall improvements to ladder handling code
Co-Authored-By: Max <161382234+dyspose@users.noreply.github.com>
This commit is contained in:
jeefo 2024-04-17 21:20:45 +03:00
commit 38551eae21
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
11 changed files with 151 additions and 98 deletions

View file

@ -1151,7 +1151,7 @@ Bot::Bot (edict_t *bot, int difficulty, int personality, int team, int skin) {
}
m_basePing = rg.get (cv_ping_base_min.int_ (), cv_ping_base_max.int_ ());
m_lastCommandTime = game.time () - 0.1f;
m_previousThinkTime = game.time () - 0.1f;
m_frameInterval = game.time ();
m_heavyTimestamp = game.time ();
m_slowFrameTimestamp = 0.0f;
@ -1620,7 +1620,7 @@ void Bot::newRound () {
if (rg.chance (50)) {
pushChatterMessage (Chatter::NewRound);
}
auto thinkFps = cr::clamp (cv_think_fps.float_ (), 24.0f, 90.0f);
auto thinkFps = cr::clamp (cv_think_fps.float_ (), 30.0f, 90.0f);
auto updateInterval = 1.0f / thinkFps;
if (game.is (GameFlags::Xash3D)) {
@ -1634,7 +1634,8 @@ void Bot::newRound () {
else if (game.is (GameFlags::Legacy)) {
updateInterval = 0.0f; // legacy games behaves strange, when this enabled
}
m_updateInterval = updateInterval;
m_thinkDelay.interval = updateInterval;
m_commandDelay.interval = 1.0f / 60.0f;
}
void Bot::resetPathSearchType () {