- Finally has the right idea how to restore Doom's original clipping of projectiles

against decorations without breaking anything newer:
  Added a new 'projectilepassheight' property that defines an alternative height
  that is only used when checking a projectile's movement against this actor.
  If the value is positive it is used regardless of other settings, if it is
  negative, its absolute will be used if a new compatibility option is enabled
  and if it is 0 the normal height will be used.


SVN r1253 (trunk)
This commit is contained in:
Christoph Oelckers 2008-10-05 11:23:41 +00:00
commit 2221ab5668
13 changed files with 80 additions and 2 deletions

View file

@ -745,8 +745,24 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm)
{
return true;
}
int clipheight;
if (thing->projectilepassheight > 0)
{
clipheight = thing->projectilepassheight;
}
else if (thing->projectilepassheight < 0 && (i_compatflags & COMPATF_MISSILECLIP))
{
clipheight = -thing->projectilepassheight;
}
else
{
clipheight = thing->height;
}
// Check if it went over / under
if (tm.thing->z > thing->z + thing->height)
if (tm.thing->z > thing->z + clipheight)
{ // Over thing
return true;
}