- Extended MF3_SKYEXPLODE to apply to horizon walls as well.

SVN r2034 (trunk)
This commit is contained in:
Randy Heit 2009-12-20 05:11:30 +00:00
parent bdd1203aca
commit 00447b8f44
2 changed files with 21 additions and 16 deletions

View file

@ -1,3 +1,6 @@
December 19, 2009
- Extended MF3_SKYEXPLODE to apply to horizon walls as well.
December 19, 2009 (Changes by Graf Zahl) December 19, 2009 (Changes by Graf Zahl)
- Fixed: It was not possible to set the ammo type of a weapon explicitly to - Fixed: It was not possible to set the ammo type of a weapon explicitly to
'none'. 'none'.

View file

@ -1190,7 +1190,7 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
return; return;
} }
if (line != NULL && line->special == Line_Horizon) if (line != NULL && line->special == Line_Horizon && !(mo->flags3 & MF3_SKYEXPLODE))
{ {
// [RH] Don't explode missiles on horizon lines. // [RH] Don't explode missiles on horizon lines.
mo->Destroy (); mo->Destroy ();
@ -1901,22 +1901,24 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
} }
explode: explode:
// explode a missile // explode a missile
if (tm.ceilingline && if (!(mo->flags3 & MF3_SKYEXPLODE))
tm.ceilingline->backsector &&
tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
mo->z >= tm.ceilingline->backsector->ceilingplane.ZatPoint (mo->x, mo->y) && //killough
!(mo->flags3 & MF3_SKYEXPLODE))
{ {
// Hack to prevent missiles exploding against the sky. if (tm.ceilingline &&
// Does not handle sky floors. tm.ceilingline->backsector &&
mo->Destroy (); tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
return oldfloorz; mo->z >= tm.ceilingline->backsector->ceilingplane.ZatPoint (mo->x, mo->y))
} {
// [RH] Don't explode on horizon lines. // Hack to prevent missiles exploding against the sky.
if (mo->BlockingLine != NULL && mo->BlockingLine->special == Line_Horizon) // Does not handle sky floors.
{ mo->Destroy ();
mo->Destroy (); return oldfloorz;
return oldfloorz; }
// [RH] Don't explode on horizon lines.
if (mo->BlockingLine != NULL && mo->BlockingLine->special == Line_Horizon)
{
mo->Destroy ();
return oldfloorz;
}
} }
P_ExplodeMissile (mo, mo->BlockingLine, BlockingMobj); P_ExplodeMissile (mo, mo->BlockingLine, BlockingMobj);
return oldfloorz; return oldfloorz;