Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block land monsters #19

Merged
merged 1 commit into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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