diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-10 13:37:04 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-10 13:37:04 +0400 |
commit | 1c6956a4d6b15ddca3588f1838d3b9903e7239af (patch) | |
tree | c8aee4e95b584f4c6f5a46a8a44d1ebcd491ab6b /source/gameengine/Converter/KX_ConvertActuators.cpp | |
parent | 2d677efb3b52814d5b96f1aa496d75083187b3fe (diff) |
quiet msvc/mingw compiler warnings.
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertActuators.cpp')
-rw-r--r-- | source/gameengine/Converter/KX_ConvertActuators.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index b9e41d553b3..01516a24182 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -37,6 +37,8 @@ #pragma warning (disable : 4786) #endif //WIN32 +#include <math.h> + #include "MEM_guardedalloc.h" #include "KX_BlenderSceneConverter.h" @@ -395,7 +397,7 @@ void BL_ConvertActuators(char* maggiename, new KX_SoundActuator(gameobj, snd_sound, soundact->volume, - exp((soundact->pitch / 12.0) * log(2.0)), + (float)(exp((soundact->pitch / 12.0) * log(2.0))), is3d, settings, soundActuatorType); @@ -542,8 +544,8 @@ void BL_ConvertActuators(char* maggiename, /* convert settings... degrees in the ui become radians */ /* internally */ if (conact->type == ACT_CONST_TYPE_ORI) { - min = (MT_2_PI * conact->minloc[0])/360.0; - max = (MT_2_PI * conact->maxloc[0])/360.0; + min = (float)((MT_2_PI * conact->minloc[0])/360.0); + max = (float)((MT_2_PI * conact->maxloc[0])/360.0); switch (conact->mode) { case ACT_CONST_DIRPX: locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ORIX; @@ -642,18 +644,18 @@ void BL_ConvertActuators(char* maggiename, break; case ACT_CONST_ROTX: locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTX; - min = MT_2_PI * conact->minrot[0] / 360.0; - max = MT_2_PI * conact->maxrot[0] / 360.0; + min = conact->minrot[0] * (float)MT_RADS_PER_DEG; + max = conact->maxrot[0] * (float)MT_RADS_PER_DEG; break; case ACT_CONST_ROTY: locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTY; - min = MT_2_PI * conact->minrot[1] / 360.0; - max = MT_2_PI * conact->maxrot[1] / 360.0; + min = conact->minrot[1] * (float)MT_RADS_PER_DEG; + max = conact->maxrot[1] * (float)MT_RADS_PER_DEG; break; case ACT_CONST_ROTZ: locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTZ; - min = MT_2_PI * conact->minrot[2] / 360.0; - max = MT_2_PI * conact->maxrot[2] / 360.0; + min = conact->minrot[2] * (float)MT_RADS_PER_DEG; + max = conact->maxrot[2] * (float)MT_RADS_PER_DEG; break; default: ; /* error */ |