From f6f15ba764cffee5fcbd03044f93b473be131821 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 10 Nov 2006 12:13:37 +0000 Subject: [PATCH] - Added a check to P_CheckMissileSpawn to decrease the monster counter if it was called for spawning a monster with A_CustomMissile. - Added a ML_BLOCK_PLAYERS line flag. SVN r380 (trunk) --- docs/rh-log.txt | 5 +++++ src/b_func.cpp | 2 +- src/doomdata.h | 1 + src/p_acs.cpp | 12 ++++++++---- src/p_acs.h | 3 ++- src/p_map.cpp | 13 +++++++++---- src/p_mobj.cpp | 6 ++++++ wadsrc/decorate/doom/demon.txt | 1 + 8 files changed, 33 insertions(+), 10 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 619363257..9246c5499 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +November 10, 2006 (Changes by Graf Zahl) +- Added a check to P_CheckMissileSpawn to decrease the monster counter + if it was called for spawning a monster with A_CustomMissile. +- Added a ML_BLOCK_PLAYERS line flag. + November 5, 2006 (Changes by Graf Zahl) - Converted Heretic's and Hexen's players to DECORATE. - Made Hexenarmor factors configurable by DECORATE. diff --git a/src/b_func.cpp b/src/b_func.cpp index c1ef82a3a..9eabba393 100644 --- a/src/b_func.cpp +++ b/src/b_func.cpp @@ -52,7 +52,7 @@ static bool PTR_Reachable (intercept_t *in) { line = in->d.line; - if (!(line->flags & ML_TWOSIDED) || (line->flags & ML_BLOCKING)) + if (!(line->flags & ML_TWOSIDED) || (line->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING|ML_BLOCK_PLAYERS))) { return (reachable = false); //Cannot continue. } diff --git a/src/doomdata.h b/src/doomdata.h index cc6c49d4b..0f3e875b4 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -175,6 +175,7 @@ static inline int GET_SPAC (int flags) #define ML_BLOCK_FLOATERS 0x00040000 #define ML_CLIP_MIDTEX 0x00080000 // Automatic for every Strife line #define ML_WRAP_MIDTEX 0x00100000 +#define ML_BLOCK_PLAYERS 0x00200000 // Sector definition, from editing typedef struct diff --git a/src/p_acs.cpp b/src/p_acs.cpp index fe252a661..d23abcd40 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -4028,21 +4028,25 @@ int DLevelScript::RunScript () switch (STACK(1)) { case BLOCK_NOTHING: - lines[line].flags &= ~(ML_BLOCKING|ML_BLOCKEVERYTHING|ML_RAILING); + lines[line].flags &= ~(ML_BLOCKING|ML_BLOCKEVERYTHING|ML_RAILING|ML_BLOCK_PLAYERS); break; case BLOCK_CREATURES: default: - lines[line].flags &= ~(ML_BLOCKEVERYTHING|ML_RAILING); + lines[line].flags &= ~(ML_BLOCKEVERYTHING|ML_RAILING|ML_BLOCK_PLAYERS); lines[line].flags |= ML_BLOCKING; break; case BLOCK_EVERYTHING: - lines[line].flags &= ~ML_RAILING; + lines[line].flags &= ~(ML_RAILING|ML_BLOCK_PLAYERS); lines[line].flags |= ML_BLOCKING|ML_BLOCKEVERYTHING; break; case BLOCK_RAILING: - lines[line].flags &= ~ML_BLOCKEVERYTHING; + lines[line].flags &= ~(ML_BLOCKEVERYTHING|ML_BLOCK_PLAYERS); lines[line].flags |= ML_RAILING|ML_BLOCKING; break; + case BLOCK_PLAYERS: + lines[line].flags &= ~(ML_BLOCKEVERYTHING|ML_BLOCKING|ML_RAILING); + lines[line].flags |= ML_BLOCK_PLAYERS; + break; } } diff --git a/src/p_acs.h b/src/p_acs.h index 83e17ae6a..67d8171e6 100644 --- a/src/p_acs.h +++ b/src/p_acs.h @@ -578,7 +578,8 @@ public: BLOCK_NOTHING = 0, BLOCK_CREATURES = 1, BLOCK_EVERYTHING = 2, - BLOCK_RAILING = 3 + BLOCK_RAILING = 3, + BLOCK_PLAYERS = 4 }; enum { LEVELINFO_PAR_TIME, diff --git a/src/p_map.cpp b/src/p_map.cpp index f976676f0..8f13c7b7d 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -675,9 +675,10 @@ bool PIT_CheckLine (line_t *ld) { rail = true; } - else if ((ld->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING)) || // explicitly blocking everything - (!(tmthing->flags3 & MF3_NOBLOCKMONST) && (ld->flags & ML_BLOCKMONSTERS)) || // block monsters only - ((ld->flags & ML_BLOCK_FLOATERS) && (tmthing->flags & MF_FLOAT))) // block floaters + else if ((ld->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING)) || // explicitly blocking everything + (!(tmthing->flags3 & MF3_NOBLOCKMONST) && (ld->flags & ML_BLOCKMONSTERS)) || // block monsters only + (tmthing->player != NULL && (ld->flags & ML_BLOCK_PLAYERS)) || // block players + ((ld->flags & ML_BLOCK_FLOATERS) && (tmthing->flags & MF_FLOAT))) // block floaters { if (tmthing->flags2 & MF2_BLASTED) { @@ -2063,6 +2064,10 @@ bool PTR_SlideTraverse (intercept_t* in) { goto isblocking; } + if (li->flags & ML_BLOCK_PLAYERS && slidemo->player != NULL) + { + goto isblocking; + } // set openrange, opentop, openbottom P_LineOpening (li, trace.x + FixedMul (trace.dx, in->frac), @@ -3290,7 +3295,7 @@ bool PTR_NoWayTraverse (intercept_t *in) // [GrafZahl] de-obfuscated. Was I the only one who was unable to makes sense out of // this convoluted mess? if (ld->special) return true; - if (ld->flags&(ML_BLOCKING|ML_BLOCKEVERYTHING)) return false; + if (ld->flags&(ML_BLOCKING|ML_BLOCKEVERYTHING|ML_BLOCK_PLAYERS)) return false; P_LineOpening(ld, trace.x+FixedMul(trace.dx, in->frac),trace.y+FixedMul(trace.dy, in->frac)); return openrange >0 && openbottom <= usething->z + usething->MaxStepHeight && diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 911599675..1d2400ff3 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4224,6 +4224,12 @@ bool P_CheckMissileSpawn (AActor* th) // [RH] Don't explode ripping missiles that spawn inside something if (BlockingMobj == NULL || !(th->flags2 & MF2_RIP)) { + // If this is a monster spawned by A_CustomMissile subtract it from the counter. + if (th->CountsAsKill()) + { + th->flags&=~MF_COUNTKILL; + level.total_monsters--; + } // [RH] Don't explode missiles that spawn on top of horizon lines if (BlockingLine != NULL && BlockingLine->special == Line_Horizon) { diff --git a/wadsrc/decorate/doom/demon.txt b/wadsrc/decorate/doom/demon.txt index 9ace39e4a..1090348ee 100644 --- a/wadsrc/decorate/doom/demon.txt +++ b/wadsrc/decorate/doom/demon.txt @@ -59,6 +59,7 @@ ACTOR Demon 3002 //=========================================================================== ACTOR Spectre : Demon 58 { + Game Doom SpawnID 9 +SHADOW RenderStyle OptFuzzy