Skip to content

Commit

Permalink
Merge pull request #19 from kraflab/block-land-monsters
Browse files Browse the repository at this point in the history
Block land monsters
  • Loading branch information
kraflab authored Apr 2, 2021
2 parents c31040e + 694e5e1 commit f73509f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 16 additions & 0 deletions prboom2/src/doomdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ typedef struct {
//allow multiple push/switch triggers to be used on one push
#define ML_PASSUSE 512


// Reserved by EE
// SoM 9/02/02: 3D Middletexture flag!
#define ML_3DMIDTEX 1024

// haleyjd 05/02/06: Although it was believed until now that a reserved line
// flag was unnecessary, a problem with Ultimate DOOM E2M7 has disproven this
// theory. It has roughly 1000 linedefs with 0xFE00 masked into the flags, so
// making the next line flag reserved and using it to toggle off ALL extended
// flags will preserve compatibility for such maps. I have been told this map
// is one of the first ever created, so it may have something to do with that.
#define ML_RESERVED 2048

// mbf21
#define ML_BLOCKLANDMONSTERS 4096

// Sector definition, from editing.
typedef struct {
short floorheight;
Expand Down
5 changes: 4 additions & 1 deletion prboom2/src/p_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,10 @@ dboolean PIT_CheckLine (line_t* ld)
// killough 8/9/98: monster-blockers don't affect friends
if (
!(tmthing->flags & MF_FRIEND || tmthing->player) &&
ld->flags & ML_BLOCKMONSTERS &&
(
ld->flags & ML_BLOCKMONSTERS ||
(mbf21 && ld->flags & ML_BLOCKLANDMONSTERS && !(tmthing->flags & MF_FLOAT))
) &&
tmthing->type != HERETIC_MT_POD
)
return false; // block monsters only
Expand Down

0 comments on commit f73509f

Please sign in to comment.