Kill CheckMissileImpact, it has been useless for probably a decade and a half

This commit is contained in:
Monster Iestyn 2018-11-23 23:14:49 +00:00
parent d228e35fcb
commit 794d27b49e

View file

@ -1700,18 +1700,6 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam)
return true; return true;
} }
//
// CheckMissileImpact
//
static void CheckMissileImpact(mobj_t *mobj)
{
if (!(mobj->flags & MF_MISSILE) || !mobj->target)
return;
if (!mobj->target->player)
return;
}
// The highest the camera will "step up" onto another floor. // The highest the camera will "step up" onto another floor.
#define MAXCAMERASTEPMOVE MAXSTEPMOVE #define MAXCAMERASTEPMOVE MAXSTEPMOVE
@ -1932,11 +1920,7 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
} }
if (!P_CheckPosition(thing, tryx, tryy)) if (!P_CheckPosition(thing, tryx, tryy))
{
if (!P_MobjWasRemoved(thing))
CheckMissileImpact(thing);
return false; // solid wall or thing return false; // solid wall or thing
}
if (!(thing->flags & MF_NOCLIP)) if (!(thing->flags & MF_NOCLIP))
{ {
@ -1962,7 +1946,6 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
if (tmceilingz - tmfloorz < thing->height) if (tmceilingz - tmfloorz < thing->height)
{ {
CheckMissileImpact(thing);
if (tmfloorthing) if (tmfloorthing)
tmhitthing = tmfloorthing; tmhitthing = tmfloorthing;
return false; // doesn't fit return false; // doesn't fit
@ -1973,16 +1956,10 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
if (thing->eflags & MFE_VERTICALFLIP) if (thing->eflags & MFE_VERTICALFLIP)
{ {
if (thing->z < tmfloorz) if (thing->z < tmfloorz)
{
CheckMissileImpact(thing);
return false; // mobj must raise itself to fit return false; // mobj must raise itself to fit
}
} }
else if (tmceilingz < thingtop) else if (tmceilingz < thingtop)
{
CheckMissileImpact(thing);
return false; // mobj must lower itself to fit return false; // mobj must lower itself to fit
}
// Ramp test // Ramp test
if (maxstep > 0 && !( if (maxstep > 0 && !(
@ -2030,7 +2007,6 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
{ {
if (thingtop - tmceilingz > maxstep) if (thingtop - tmceilingz > maxstep)
{ {
CheckMissileImpact(thing);
if (tmfloorthing) if (tmfloorthing)
tmhitthing = tmfloorthing; tmhitthing = tmfloorthing;
return false; // too big a step up return false; // too big a step up
@ -2038,18 +2014,11 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
} }
else if (tmfloorz - thing->z > maxstep) else if (tmfloorz - thing->z > maxstep)
{ {
CheckMissileImpact(thing);
if (tmfloorthing) if (tmfloorthing)
tmhitthing = tmfloorthing; tmhitthing = tmfloorthing;
return false; // too big a step up return false; // too big a step up
} }
if (tmfloorz > thing->z)
{
if (thing->flags & MF_MISSILE)
CheckMissileImpact(thing);
}
if (!allowdropoff && !(thing->flags & MF_FLOAT) && thing->type != MT_SKIM && !tmfloorthing) if (!allowdropoff && !(thing->flags & MF_FLOAT) && thing->type != MT_SKIM && !tmfloorthing)
{ {
if (thing->eflags & MFE_VERTICALFLIP) if (thing->eflags & MFE_VERTICALFLIP)