diff options
author | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-12-16 03:31:38 +0300 |
---|---|---|
committer | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-12-16 03:53:48 +0300 |
commit | 0c19a043e8198018ae794145fc4f1e78d5f00923 (patch) | |
tree | 3758688cd3639adcd50b0ce298bdf758b890e4f9 /source/gameengine/Ketsji/KX_Scene.cpp | |
parent | 5b331150709616fc5aee9c1af228d48175032ea0 (diff) |
BGE Ketsji clean-up: double-promotion warnings
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 350bad0a336..9eb9066d56f 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -898,7 +898,7 @@ SCA_IObject* KX_Scene::AddReplicaObject(class CValue* originalobject, m_tempObjectList->Add(replica->AddRef()); // this convert the life from frames to sort-of seconds, hard coded 0.02 that assumes we have 50 frames per second // if you change this value, make sure you change it in KX_GameObject::pyattr_get_life property too - CValue *fval = new CFloatValue(lifespan*0.02); + CValue *fval = new CFloatValue(lifespan*0.02f); replica->SetProperty("::timebomb",fval); fval->Release(); } @@ -1588,7 +1588,7 @@ void KX_Scene::LogicBeginFrame(double curtime) if (propval) { - float timeleft = propval->GetNumber() - 1.0/KX_KetsjiEngine::GetTicRate(); + float timeleft = (float)(propval->GetNumber() - 1.0/KX_KetsjiEngine::GetTicRate()); if (timeleft > 0) { @@ -1827,9 +1827,9 @@ void KX_Scene::UpdateObjectActivity(void) * Manhattan distance. */ MT_Point3 obpos = ob->NodeGetWorldPosition(); - if ((fabs(camloc[0] - obpos[0]) > m_activity_box_radius) || - (fabs(camloc[1] - obpos[1]) > m_activity_box_radius) || - (fabs(camloc[2] - obpos[2]) > m_activity_box_radius) ) + if ((fabsf(camloc[0] - obpos[0]) > m_activity_box_radius) || + (fabsf(camloc[1] - obpos[1]) > m_activity_box_radius) || + (fabsf(camloc[2] - obpos[2]) > m_activity_box_radius) ) { ob->Suspend(); } @@ -1843,8 +1843,8 @@ void KX_Scene::UpdateObjectActivity(void) void KX_Scene::SetActivityCullingRadius(float f) { - if (f < 0.5) - f = 0.5; + if (f < 0.5f) + f = 0.5f; m_activity_box_radius = f; } |