mirror of
https://github.com/yquake2/rogue.git
synced 2024-11-14 00:21:20 +00:00
Added check for inuse to G_RunEntity that was missing but necessary
This commit is contained in:
parent
ab53f4d422
commit
4c8d063a55
1 changed files with 8 additions and 10 deletions
|
@ -1255,10 +1255,9 @@ G_RunEntity(edict_t *ent)
|
||||||
gi.error("SV_Physics: bad movetype %i", (int)ent->movetype);
|
gi.error("SV_Physics: bad movetype %i", (int)ent->movetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (saved_origin)
|
|
||||||
{
|
|
||||||
/* if we moved, check and fix origin if needed */
|
/* if we moved, check and fix origin if needed */
|
||||||
if (!VectorCompare(ent->s.origin, previous_origin))
|
/* also check inuse since entities are very often freed while thinking */
|
||||||
|
if (saved_origin && ent->inuse && !VectorCompare(ent->s.origin, previous_origin))
|
||||||
{
|
{
|
||||||
trace = gi.trace(ent->s.origin, ent->mins, ent->maxs,
|
trace = gi.trace(ent->s.origin, ent->mins, ent->maxs,
|
||||||
previous_origin, ent, MASK_MONSTERSOLID);
|
previous_origin, ent, MASK_MONSTERSOLID);
|
||||||
|
@ -1269,7 +1268,6 @@ G_RunEntity(edict_t *ent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Toss, bounce, and fly movement. When on ground and
|
* Toss, bounce, and fly movement. When on ground and
|
||||||
|
|
Loading…
Reference in a new issue