From 00447b8f444757f4b55eed57cf462c7493b11228 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 20 Dec 2009 05:11:30 +0000 Subject: [PATCH] - Extended MF3_SKYEXPLODE to apply to horizon walls as well. SVN r2034 (trunk) --- docs/rh-log.txt | 3 +++ src/p_mobj.cpp | 34 ++++++++++++++++++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 0897f3eb9..11bdf92bf 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,6 @@ +December 19, 2009 +- Extended MF3_SKYEXPLODE to apply to horizon walls as well. + December 19, 2009 (Changes by Graf Zahl) - Fixed: It was not possible to set the ammo type of a weapon explicitly to 'none'. diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 0d3ab7ac2..868941d01 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -1190,7 +1190,7 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target) 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. mo->Destroy (); @@ -1901,22 +1901,24 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly) } explode: // explode a missile - if (tm.ceilingline && - 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)) + if (!(mo->flags3 & MF3_SKYEXPLODE)) { - // Hack to prevent missiles exploding against the sky. - // Does not handle sky floors. - mo->Destroy (); - return oldfloorz; - } - // [RH] Don't explode on horizon lines. - if (mo->BlockingLine != NULL && mo->BlockingLine->special == Line_Horizon) - { - mo->Destroy (); - return oldfloorz; + if (tm.ceilingline && + tm.ceilingline->backsector && + tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum && + mo->z >= tm.ceilingline->backsector->ceilingplane.ZatPoint (mo->x, mo->y)) + { + // Hack to prevent missiles exploding against the sky. + // Does not handle sky floors. + mo->Destroy (); + 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); return oldfloorz;