]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/xmlsound.cxx
Maik JUSTUS: fix/implement directional sound
[simgear.git] / simgear / sound / xmlsound.cxx
index be5a8213be421cf86dc33edf59c5b92745a10ff7..c4b6523314fa643fbbcee35315e0940542edea6d 100644 (file)
 //
 // $Id$
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include <simgear/compiler.h>
 
 #include <string.h>
@@ -233,7 +237,7 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node, SGSoundMgr *sndmgr,
    SGPropertyNode_ptr pos = node->getChild("position");
    if ( pos != NULL ) {
        offset_pos[0] = pos->getDoubleValue("x", 0.0);
-       offset_pos[1] = pos->getDoubleValue("y", 0.0);
+       offset_pos[1] = -pos->getDoubleValue("y", 0.0);
        offset_pos[2] = pos->getDoubleValue("z", 0.0);
    }
 
@@ -248,7 +252,7 @@ SGXmlSound::init(SGPropertyNode *root, SGPropertyNode *node, SGSoundMgr *sndmgr,
    pos = node->getChild("orientation");
    if ( pos != NULL ) {
       dir[0] = pos->getDoubleValue("x", 0.0);
-      dir[1] = pos->getDoubleValue("y", 0.0);
+      dir[1] = -pos->getDoubleValue("y", 0.0);
       dir[2] = pos->getDoubleValue("z", 0.0);
       inner = pos->getDoubleValue("inner-angle", 360.0);
       outer = pos->getDoubleValue("outer-angle", 360.0);