From: havoc Date: Wed, 9 Nov 2011 19:39:40 +0000 (+0000) Subject: don't call ODE dWorldQuickStep with 0 step time X-Git-Tag: xonotic-v0.6.0~163^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=84aa1c7f53ee811b5061c5d703c3c15927e3b30d;p=xonotic%2Fdarkplaces.git don't call ODE dWorldQuickStep with 0 step time git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11544 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/world.c b/world.c index 43fc01ed..1225090c 100644 --- a/world.c +++ b/world.c @@ -2672,8 +2672,10 @@ void World_Physics_Frame(world_t *world, double frametime, double gravity) collisiontime += (Sys_DirtyTime() - tdelta3)*10000; // run physics (move objects, calculate new velocities) + // be sure not to pass 0 as step time because that causes an ODE error dWorldSetQuickStepNumIterations((dWorldID)world->physics.ode_world, bound(1, physics_ode_worldstep_iterations.integer, 200)); - dWorldQuickStep((dWorldID)world->physics.ode_world, world->physics.ode_step); + if (world->physics.ode_step > 0) + dWorldQuickStep((dWorldID)world->physics.ode_world, world->physics.ode_step); // clear the JointGroup now that we're done with it dJointGroupEmpty((dJointGroupID)world->physics.ode_contactgroup);