Correctly check the max yaw offset in AI_CanTarget()

This caused AI to exit turrets immediately
This commit is contained in:
smallmodel 2024-09-01 16:46:24 +02:00
parent 010a5ffc74
commit 96d16bcbc1
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -778,7 +778,7 @@ bool TurretGun::AI_CanTarget(const vec3_t pos)
yawCap = AngleSubtract(vAngles[1], m_fStartYaw);
if (yawCap > m_fMaxYawOffset) {
return false;
} else if (yawCap < m_fMaxYawOffset) {
} else if (yawCap < -m_fMaxYawOffset) {
return false;
}