Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Ketsji/KX_KetsjiEngine.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 651450f01bf..421e642a6df 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -70,6 +70,7 @@
#ifdef WITH_AUDASPACE
# include "AUD_C-API.h"
+# include "AUD_I3DDevice.h"
#endif
#include "NG_NetworkScene.h"
@@ -995,16 +996,20 @@ void KX_KetsjiEngine::DoSound(KX_Scene* scene)
if (!cam)
return;
- float f[4];
-
- cam->NodeGetWorldPosition().getValue(f);
- AUD_setListenerLocation(f);
+ AUD_I3DDevice* dev = AUD_get3DDevice();
+ if(dev)
+ {
+ AUD_Vector3 v;
+ AUD_Quaternion q;
+ cam->NodeGetWorldPosition().getValue(v.get());
+ dev->setListenerLocation(v);
- cam->GetLinearVelocity().getValue(f);
- AUD_setListenerVelocity(f);
+ cam->GetLinearVelocity().getValue(v.get());
+ dev->setListenerVelocity(v);
- cam->NodeGetWorldOrientation().getRotation().getValue(f);
- AUD_setListenerOrientation(f);
+ cam->NodeGetWorldOrientation().getRotation().getValue(q.get());
+ dev->setListenerOrientation(q);
+ }
}