diff --git a/specs/udmf_zdoom.txt b/specs/udmf_zdoom.txt index a6d8acb5d..3241bf4c8 100644 --- a/specs/udmf_zdoom.txt +++ b/specs/udmf_zdoom.txt @@ -113,6 +113,7 @@ Note: All fields default to false unless mentioned otherwise. blockprojectiles = ;// Line blocks all projectiles blockuse = ; // Line blocks all use actions blocksight = ; // Line blocks monster line of sight + blockhitscan = ; // Line blocks hitscan attacks locknumber = ; // Line special is locked arg0str = ; // Alternate string-based version of arg0 diff --git a/src/doomdata.h b/src/doomdata.h index 46af9d6a4..55903170a 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -153,6 +153,7 @@ enum ELineFlags ML_BLOCKPROJECTILE = 0x01000000, ML_BLOCKUSE = 0x02000000, // blocks all use actions through this line ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight + ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks }; diff --git a/src/namedef.h b/src/namedef.h index f2d601eb5..f7607400e 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -465,6 +465,7 @@ xx(blockprojectiles) xx(blockuse) xx(hidden) xx(blocksight) +xx(blockhitscan) xx(Renderstyle) diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index a0164ab82..869fd5169 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -2545,6 +2545,7 @@ FUNC(LS_Line_SetBlocking) ML_RAILING, ML_BLOCKUSE, ML_BLOCKSIGHT, + ML_BLOCKHITSCAN, -1 }; diff --git a/src/p_map.cpp b/src/p_map.cpp index 211e03056..da87481d0 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3563,7 +3563,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, else tflags = TRACE_NoSky|TRACE_Impact; if (!Trace (t1->x, t1->y, shootz, t1->Sector, vx, vy, vz, distance, - MF_SHOOTABLE, ML_BLOCKEVERYTHING, t1, trace, + MF_SHOOTABLE, ML_BLOCKEVERYTHING|ML_BLOCKHITSCAN, t1, trace, tflags, hitGhosts ? CheckForGhost : CheckForSpectral)) { // hit nothing if (puffDefaults == NULL) diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 6d935ba63..fc5964737 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -927,6 +927,10 @@ public: Flag(ld->flags, ML_BLOCKSIGHT, key); continue; + case NAME_blockhitscan: + Flag(ld->flags, ML_BLOCKHITSCAN, key); + continue; + // [Dusk] lock number case NAME_Locknumber: ld->locknumber = CheckInt(key);