mirror of
https://github.com/yquake2/ctf.git
synced 2024-11-29 07:02:30 +00:00
Limit the fix against black debris to gibs, debris, monsters.
Pushing all entities slightly away from non-horizontal may let items to slide to unreachable locations, or let monsters getting stuck. This is part of yquake2/xatrix#50
This commit is contained in:
parent
2ffb440a66
commit
71574de589
1 changed files with 9 additions and 1 deletions
|
@ -501,9 +501,17 @@ retry:
|
||||||
prevent origin stuck in the plane which causes
|
prevent origin stuck in the plane which causes
|
||||||
the entity to be rendered in full black. */
|
the entity to be rendered in full black. */
|
||||||
if (trace.plane.type != 2)
|
if (trace.plane.type != 2)
|
||||||
|
{
|
||||||
|
/* Limit the fix to gibs, debris and dead monsters.
|
||||||
|
Everything else may break existing maps. Items
|
||||||
|
may slide to unreachable locations, monsters may
|
||||||
|
get stuck, etc. */
|
||||||
|
if (((strncmp(ent->classname, "monster_", 8) == 0) && ent->health < 1) ||
|
||||||
|
(strcmp(ent->classname, "debris") == 0) || (ent->s.effects & EF_GIB))
|
||||||
{
|
{
|
||||||
VectorAdd(ent->s.origin, trace.plane.normal, ent->s.origin);
|
VectorAdd(ent->s.origin, trace.plane.normal, ent->s.origin);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (trace.fraction != 1.0)
|
if (trace.fraction != 1.0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue