From 76723cf2d82098681ec817378e6a4a062503f32a Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Tue, 21 Jan 2014 09:58:33 +0100 Subject: [PATCH] Gravity fix 2 --- Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp index 58e2e5a7..89ba326c 100644 --- a/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp +++ b/Code/GamePhysics/Implementation/PhysicsAPI_Impl.cpp @@ -159,11 +159,12 @@ void API_Impl::Update() { /** @todo TODO: Update is a temporary solution .*/ ::std::vector updateList; auto proto = this->worldScene.Sample( Universe(), updateList ).begin(); - ICustomBody::State state; (*proto)->GetState( state ); + ICustomBody::State state; for( ; proto != updateList.end(); ++proto ) { // Step 1: Apply Gravity Float4 gravityImpulse = Float4::null; + (*proto)->GetState( state ); for( ::std::vector::size_type i = 0; i < this->gravity.size(); ++i ) { switch( this->gravity[i].gravityType )