aim: tweaks to fail predict code

This commit is contained in:
jeefo 2023-05-08 21:48:59 +03:00
commit ffffca3fd9
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -74,8 +74,8 @@ void Bot::pushMsgQueue (int message) {
}
float Bot::isInFOV (const Vector &destination) {
float entityAngle = cr::wrapAngle360 (destination.yaw ()); // find yaw angle from source to destination...
float viewAngle = cr::wrapAngle360 (pev->v_angle.y); // get bot's current view angle...
const float entityAngle = cr::wrapAngle360 (destination.yaw ()); // find yaw angle from source to destination...
const float viewAngle = cr::wrapAngle360 (pev->v_angle.y); // get bot's current view angle...
// return the absolute value of angle to destination entity
// zero degrees means straight ahead, 45 degrees to the left or
@ -2736,15 +2736,14 @@ void Bot::updateAimDir () {
predictFailed = true;
}
}
else {
if (predictFailed) {
doFailPredict ();
}
else {
m_lookAt = m_lookAtSafe;
}
if (predictFailed) {
doFailPredict ();
}
}
else {
m_lookAt = m_lookAtSafe;
}
}
else if (flags & AimFlags::Camp) {
m_lookAt = m_lookAtSafe;
}