mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- 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)
This commit is contained in:
parent
e5bce37755
commit
f6f15ba764
8 changed files with 33 additions and 10 deletions
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -677,6 +677,7 @@ bool PIT_CheckLine (line_t *ld)
|
|||
}
|
||||
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 &&
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -59,6 +59,7 @@ ACTOR Demon 3002
|
|||
//===========================================================================
|
||||
ACTOR Spectre : Demon 58
|
||||
{
|
||||
Game Doom
|
||||
SpawnID 9
|
||||
+SHADOW
|
||||
RenderStyle OptFuzzy
|
||||
|
|
Loading…
Reference in a new issue