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