diff --git a/build_openmw.bat b/build_openmw.bat index 8d3575d54..05634fee9 100755 --- a/build_openmw.bat +++ b/build_openmw.bat @@ -8,4 +8,4 @@ g++ -c ogre\cpp_ogre.cpp -I.\includes\ogre\ g++ -c bullet\cpp_bullet.cpp -I.\includes\bullet\ echo Compiling main program (openmw.exe) -gdc -Wall -g openmw.d bsa\*.d core\*.d esm\*.d input\*.d nif\*.d ogre\*.d scene\*.d sound\*.d util\*.d bullet\*.d cpp_ogre.o cpp_avcodec.o cpp_bullet.o libbulletdynamics.a libbulletcollision.a libbulletmath.a mscripts\object.d monster\compiler\*.d monster\vm\*.d monster\util\*.d avcodec-51.dll avformat-52.dll avdevice-52.dll avutil-49.dll openal32.dll ogremain_d.dll OIS_d.dll -lstdc++ -o openmw.exe +gdc -g openmw.d bsa\*.d core\*.d esm\*.d input\*.d nif\*.d ogre\*.d scene\*.d sound\*.d util\*.d bullet\*.d cpp_ogre.o cpp_avcodec.o cpp_bullet.o libbulletdynamics.a libbulletcollision.a libbulletmath.a mscripts\object.d monster\monster.d monster\compiler\*.d monster\vm\*.d monster\util\*.d avcodec-51.dll avformat-52.dll avdevice-52.dll avutil-49.dll openal32.dll ogremain_d.dll OIS_d.dll -lstdc++ -o openmw.exe diff --git a/mscripts/object.d b/mscripts/object.d index 6e9ed2c3f..e9b08f065 100644 --- a/mscripts/object.d +++ b/mscripts/object.d @@ -85,13 +85,13 @@ class IdleSleep : IdleFunction bool initiate(MonsterObject *mo) { // Get the parameter - double secs = stack.popFloat; + float secs = stack.popFloat; // Get current time long newTime = getUTCtime(); // Calculate when we should return - newTime += secs*TicksPerSecond; + newTime += cast(long)secs*TicksPerSecond; // Store it if(mo.extra == null) mo.extra = new long;