Gravity fix 2

This commit is contained in:
Dander7BD 2014-01-21 09:58:33 +01:00
parent 98563b6c33
commit 76723cf2d8
1 changed files with 2 additions and 1 deletions

View File

@ -159,11 +159,12 @@ void API_Impl::Update()
{ /** @todo TODO: Update is a temporary solution .*/
::std::vector<ICustomBody*> 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<Gravity>::size_type i = 0; i < this->gravity.size(); ++i )
{
switch( this->gravity[i].gravityType )