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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-19 03:03:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-19 03:03:27 +0400
commitd0e892a7286791a4b2d1c5d7321fe8fe040819dd (patch)
tree43a9024562d8272d3211e75bea0b614d286196c8 /source/gameengine/Converter/KX_ConvertActuators.cpp
parentdb14b97be6917d961c893ba6e0188c927ffa67b0 (diff)
quiet double promotion warnings for the game engine.
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertActuators.cpp')
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 28e34769ab8..89a3f365140 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -109,7 +109,7 @@
* KX_BLENDERTRUNC needed to round 'almost' zero values to zero, else velocities etc. are incorrectly set
*/
-#define KX_BLENDERTRUNC(x) (( x < 0.0001 && x > -0.0001 ) ? 0.0 : x)
+#define KX_BLENDERTRUNC(x) (( x < 0.0001f && x > -0.0001f ) ? 0.0f : x)
void BL_ConvertActuators(const char* maggiename,
struct Object* blenderobject,
@@ -162,7 +162,7 @@ void BL_ConvertActuators(const char* maggiename,
KX_BLENDERTRUNC(obact->angularvelocity[1]),
KX_BLENDERTRUNC(obact->angularvelocity[2]));
short damping = obact->damping;
-
+
/* Blender uses a bit vector internally for the local-flags. In */
/* KX, we have four bools. The compiler should be smart enough */
/* to do the right thing. We need to explicitly convert here! */
@@ -431,7 +431,7 @@ void BL_ConvertActuators(const char* maggiename,
new KX_SoundActuator(gameobj,
snd_sound,
soundact->volume,
- (float)(exp((soundact->pitch / 12.0) * M_LN2)),
+ (float)(expf((soundact->pitch / 12.0f) * (float)M_LN2)),
is3d,
settings,
soundActuatorType);
@@ -578,8 +578,8 @@ void BL_ConvertActuators(const char* maggiename,
/* convert settings... degrees in the ui become radians */
/* internally */
if (conact->type == ACT_CONST_TYPE_ORI) {
- min = (float)((MT_2_PI * conact->minloc[0])/360.0);
- max = (float)((MT_2_PI * conact->maxloc[0])/360.0);
+ min = (float)(((float)MT_2_PI * conact->minloc[0]) / 360.0f);
+ max = (float)(((float)MT_2_PI * conact->maxloc[0]) / 360.0f);
switch (conact->mode) {
case ACT_CONST_DIRPX:
locrot = KX_ConstraintActuator::KX_ACT_CONSTRAINT_ORIX;