aim: add more fail conditions t to fail enemy prediction

bot: allow to disable think-per-frame optimization on xash3d completely, to reduce view-lags. (controlled via  cv_think_fps_disable
This commit is contained in:
jeefo 2023-06-24 21:38:34 +03:00
commit c1d045828e
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
4 changed files with 22 additions and 6 deletions

View file

@ -133,6 +133,7 @@ void Bot::updateAimDir () {
return; // do not fail instantly
}
m_aimFlags &= ~AimFlags::PredictPath;
m_trackingEdict = nullptr;
m_lookAtPredict = nullptr;
};
@ -142,7 +143,7 @@ void Bot::updateAimDir () {
int predictNode = m_lastPredictIndex;
if (predictNode != kInvalidNodeIndex) {
if (!vistab.visible (m_currentNodeIndex, predictNode)) {
if (!vistab.visible (m_currentNodeIndex, predictNode) || !vistab.visible (m_previousNodes[0], predictNode)) {
predictNode = kInvalidNodeIndex;
}
}