compile fixes.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5007 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2016-07-21 19:36:34 +00:00
parent 5eb21d1b6e
commit ec623409ff
3 changed files with 713 additions and 367 deletions

File diff suppressed because it is too large Load diff

View file

@ -2248,6 +2248,7 @@ qboolean Mod_Trace(model_t *model, int forcehullnum, int frame, vec3_t axis[3],
{
trace->surface_id = 1+surfnum;
trace->bone_id = 0;
#ifdef SKELETALMODELS
if (mod->ofs_skel_weight)
{ //fixme: would be better to consider the distance to the vertex too. cartesian coord stuff etc.
unsigned int best = 0, v, w, i;
@ -2264,6 +2265,7 @@ qboolean Mod_Trace(model_t *model, int forcehullnum, int frame, vec3_t axis[3],
}
}
}
#endif
if (axis)
{
vec3_t iaxis[3];

View file

@ -1547,10 +1547,10 @@ static void World_ODE_Frame_JointFromEntity(world_t *world, wedict_t *ed)
jointtype = 0; // can't have both
o = (wedict_t*)PROG_TO_EDICT(world->progs, enemy);
if(o->isfree || o->ode.ode_body == 0)
if(ED_ISFREE(o) || o->ode.ode_body == 0)
enemy = 0;
o = (wedict_t*)PROG_TO_EDICT(world->progs, aiment);
if(o->isfree || o->ode.ode_body == 0)
if(ED_ISFREE(o) || o->ode.ode_body == 0)
aiment = 0;
// see http://www.ode.org/old_list_archives/2006-January/017614.html
// we want to set ERP? make it fps independent and work like a spring constant
@ -2535,9 +2535,9 @@ static void VARGS nearCallback (void *data, dGeomID o1, dGeomID o2)
if (ed1->ode.ode_body == b1 || ed2->ode.ode_body == b2)
return;
}
if(!ed1 || ed1->isfree)
if(!ed1 || ED_ISFREE(ed1))
ed1 = world->edicts;
if(!ed2 || ed2->isfree)
if(!ed2 || ED_ISFREE(ed2))
ed2 = world->edicts;
//non-solid things can still interact with pushers, but not other stuff.
@ -2560,7 +2560,7 @@ static void VARGS nearCallback (void *data, dGeomID o1, dGeomID o2)
}
/* if either ent killed itself, don't collide */
if ((ed1&&ed1->isfree) || (ed2&&ed2->isfree))
if ((ed1&&ED_ISFREE(ed1)) || (ed2&&ED_ISFREE(ed2)))
return;
}
@ -2647,14 +2647,14 @@ static void QDECL World_ODE_Frame(world_t *world, double frametime, double gravi
for (i = 0;i < world->num_edicts;i++)
{
ed = (wedict_t*)EDICT_NUM(world->progs, i);
if (!ed->isfree)
if (!ED_ISFREE(ed))
World_ODE_Frame_BodyFromEntity(world, ed);
}
// oh, and it must be called after all bodies were created
for (i = 0;i < world->num_edicts;i++)
{
ed = (wedict_t*)EDICT_NUM(world->progs, i);
if (!ed->isfree)
if (!ED_ISFREE(ed))
World_ODE_Frame_JointFromEntity(world, ed);
}
while(ctx->cmdqueuehead)
@ -2697,7 +2697,7 @@ static void QDECL World_ODE_Frame(world_t *world, double frametime, double gravi
for (i = 1;i < world->num_edicts;i++)
{
ed = (wedict_t*)EDICT_NUM(world->progs, i);
if (!ed->isfree)
if (!ED_ISFREE(ed))
World_ODE_Frame_BodyToEntity(world, ed);
}
}