From ecd676ae7443f0f34fb21d0a9fd6ca68f720c656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20=E2=80=98Touky=E2=80=99=20Huet?= Date: Sun, 8 Jul 2012 16:59:11 +0000 Subject: [PATCH] Some CIS FIX. --- test/BtPhysTest.cpp | 3 ++- test/PhysicObject.h | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/BtPhysTest.cpp b/test/BtPhysTest.cpp index e80f885e..e4a4b6ce 100644 --- a/test/BtPhysTest.cpp +++ b/test/BtPhysTest.cpp @@ -71,7 +71,8 @@ BtPhysTest::BtPhysTest(bool editor) m_simulation = new Simulation(); m_simulation->InitContext(); - m_simulation->SetGravity(vec3(.0f, -10.0f, .0f)); + vec3 NewGravity = vec3(.0f, -10.0f, .0f); + m_simulation->SetGravity(NewGravity); m_ground_object = new PhysicsObject(m_simulation); Ticker::Ref(m_ground_object); diff --git a/test/PhysicObject.h b/test/PhysicObject.h index 82e83e3d..9b36c981 100644 --- a/test/PhysicObject.h +++ b/test/PhysicObject.h @@ -25,13 +25,14 @@ public: : m_ready(false) { m_mesh.Compile("[sc#add afcb110 1 110 -.1]"); - m_physics.SetShapeToBox(vec3(110.f, 1.f, 110.f)); + vec3 BoxSize = vec3(110.f, 1.f, 110.f); + m_physics.SetShapeToBox(BoxSize); m_physics.SetMass(.0f); m_physics.InitBodyToRigid(); m_physics.AddToSimulation(new_sim); } - PhysicsObject(Simulation* new_sim, float base_mass, vec3 &base_location) + PhysicsObject(Simulation* new_sim, float base_mass, const vec3 &base_location) : m_ready(false) { Array MeshRand; @@ -46,7 +47,8 @@ public: int RandValue = (int)(lol::RandF() * (MeshRand.Count() - 1)); m_mesh.Compile(MeshRand[RandValue]); - m_physics.SetShapeToBox(vec3(2.0f)); + vec3 BoxSize = vec3(2.0f); + m_physics.SetShapeToBox(BoxSize); m_physics.SetMass(base_mass); m_physics.SetBaseTransform(base_location); m_physics.InitBodyToRigid();