FTE/DP differences.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3428 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2009-11-08 23:26:03 +00:00
parent 0e9a9dd00f
commit b9baebe711

View file

@ -2158,13 +2158,19 @@ void World_Physics_Frame(world_t *world, double frametime, double gravity)
world->ode.ode_movelimit = physics_ode_movelimit.value / world->ode.ode_step;
// copy physics properties from entities to physics engine
for (i = 0, ed = world->edicts + i;i < world->num_edicts;i++, ed++)
for (i = 0;i < world->num_edicts;i++)
{
ed = EDICT_NUM(world->progs, i);
if (!ed->isfree)
World_Physics_Frame_BodyFromEntity(world, ed);
}
// oh, and it must be called after all bodies were created
for (i = 0, ed = world->edicts + i;i < world->num_edicts;i++, ed++)
for (i = 0;i < world->num_edicts;i++)
{
ed = EDICT_NUM(world->progs, i);
if (!ed->isfree)
World_Physics_Frame_JointFromEntity(world, ed);
}
for (i = 0;i < world->ode.ode_iterations;i++)
{
@ -2192,9 +2198,12 @@ void World_Physics_Frame(world_t *world, double frametime, double gravity)
}
// copy physics properties from physics engine to entities
for (i = 1, ed = world->edicts + i;i < world->num_edicts;i++, ed++)
for (i = 1;i < world->num_edicts;i++)
{
ed = EDICT_NUM(world->progs, i);
if (!ed->isfree)
World_Physics_Frame_BodyToEntity(world, ed);
}
}
}