fix: crash due xash loadiing gamedll even without starting local game server

fix: zero out yb_think_fps_disable on xash when sys_ticrate > 100 (closes #677)
This commit is contained in:
jeefo 2025-03-03 21:58:35 +03:00
commit 2fb0419765
No known key found for this signature in database
GPG key ID: D696786B81B667C8
3 changed files with 23 additions and 3 deletions

View file

@ -3449,6 +3449,11 @@ void Bot::findShortestPath (int srcIndex, int destIndex) {
void Bot::syncFindPath (int srcIndex, int destIndex, FindPath pathType) {
// this function finds a path from srcIndex to destIndex;
// stale bots shouldn't do pathfinding
if (m_isStale) {
return;
}
if (!m_pathFindLock.tryLock ()) {
return; // allow only single instance of syncFindPath per-bot
}
@ -3524,7 +3529,7 @@ void Bot::syncFindPath (int srcIndex, int destIndex, FindPath pathType) {
m_chosenGoalIndex = srcIndex;
m_goalValue = 0.0f;
auto result = m_planner->find (m_team, srcIndex, destIndex, [this] (int index) {
const auto result = m_planner->find (m_team, srcIndex, destIndex, [this] (int index) {
m_pathWalk.add (index);
return true;
});