mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:21:16 +02:00
fix calcuation of distance attenuation coefficient
This commit is contained in:
parent
171c919946
commit
7064beba8b
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ void *sendBuffer(void *args)
|
||||||
int lowAgentIndex = std::min(i, j);
|
int lowAgentIndex = std::min(i, j);
|
||||||
int highAgentIndex = std::max(i, j);
|
int highAgentIndex = std::max(i, j);
|
||||||
|
|
||||||
if (distanceCoeffs[lowAgentIndex][highAgentIndex] != 0) {
|
if (distanceCoeffs[lowAgentIndex][highAgentIndex] == 0) {
|
||||||
float distanceToAgent = sqrtf(powf(agentPosition[0] - otherAgentPosition[0], 2) +
|
float distanceToAgent = sqrtf(powf(agentPosition[0] - otherAgentPosition[0], 2) +
|
||||||
powf(agentPosition[1] - otherAgentPosition[1], 2) +
|
powf(agentPosition[1] - otherAgentPosition[1], 2) +
|
||||||
powf(agentPosition[2] - otherAgentPosition[2], 2));
|
powf(agentPosition[2] - otherAgentPosition[2], 2));
|
||||||
|
|
Loading…
Reference in a new issue