diff --git a/input/events.d b/input/events.d index 135dd5b48..0158a0aa4 100644 --- a/input/events.d +++ b/input/events.d @@ -45,6 +45,8 @@ import gui.gui; import input.keys; import input.ois; +import openmw; + // Debug output //debug=printMouse; // Mouse button events //debug=printMouseMove; // Mouse movement events @@ -343,19 +345,21 @@ extern(C) int d_frameStarted(float time) playerData.position.position[1] = y; playerData.position.position[2] = z; - // Tell the sound scene that the player has moved - sndCumTime += time; - if(sndCumTime > sndRefresh) + if(!noSound) { - float fx, fy, fz; - float ux, uy, uz; - - ogre_getCameraOrientation(&fx, &fy, &fz, &ux, &uy, &uz); - - soundScene.update(x,y,z,fx,fy,fz,ux,uy,uz); - sndCumTime -= sndRefresh; + // Tell the sound scene that the player has moved + sndCumTime += time; + if(sndCumTime > sndRefresh) + { + float fx, fy, fz; + float ux, uy, uz; + + ogre_getCameraOrientation(&fx, &fy, &fz, &ux, &uy, &uz); + + soundScene.update(x,y,z,fx,fy,fz,ux,uy,uz); + sndCumTime -= sndRefresh; + } } - return 1; } diff --git a/openmw.d b/openmw.d index 10bb3ab14..ce6d43a1f 100644 --- a/openmw.d +++ b/openmw.d @@ -21,7 +21,7 @@ */ -module morro; +module openmw; import std.stdio; import std.string; @@ -81,13 +81,14 @@ void poolSize() } //*/ +bool noSound = false; + void main(char[][] args) { bool render = true; bool help = false; bool resetKeys = false; bool showOgreFlag = false; - bool noSound = false; bool debugOut = false; bool extTest = false; bool doGen = false;