mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
correct the angle of delivery
This commit is contained in:
parent
04b223a020
commit
8187724410
1 changed files with 5 additions and 0 deletions
|
@ -172,6 +172,11 @@ void *sendBuffer(void *args) {
|
|||
bearingRelativeAngleToSource *= (M_PI / 180);
|
||||
|
||||
float angleOfDelivery = absoluteAngleToSource - otherAgentBuffer->getBearing();
|
||||
|
||||
if (angleOfDelivery < -180) {
|
||||
angleOfDelivery += 360;
|
||||
}
|
||||
|
||||
float offAxisCoefficient = MAX_OFF_AXIS_ATTENUATION +
|
||||
(OFF_AXIS_ATTENUATION_FORMULA_STEP * (fabsf(angleOfDelivery) / 90.0f));
|
||||
|
||||
|
|
Loading…
Reference in a new issue