From 7064beba8bdf78f8a3ef3f1dbe5db339449d3795 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 4 Mar 2013 15:10:53 -0800 Subject: [PATCH] fix calcuation of distance attenuation coefficient --- mixer/src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mixer/src/main.cpp b/mixer/src/main.cpp index 49ddd98bd8..dd6ad8c974 100644 --- a/mixer/src/main.cpp +++ b/mixer/src/main.cpp @@ -96,7 +96,7 @@ void *sendBuffer(void *args) int lowAgentIndex = std::min(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) + powf(agentPosition[1] - otherAgentPosition[1], 2) + powf(agentPosition[2] - otherAgentPosition[2], 2));