aim: tweaks to fail predict code
This commit is contained in:
parent
e38bca9c14
commit
ffffca3fd9
1 changed files with 9 additions and 10 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue