From 90cb0b32158c37f7893009f54ef348b2d1acad13 Mon Sep 17 00:00:00 2001 From: RockstarRaccoon Date: Sat, 19 May 2018 09:31:22 +0300 Subject: [PATCH] - added 'revealed on automap' linedef flag, UDMF only https://forum.zdoom.org/viewtopic.php?t=59808 --- src/am_map.cpp | 2 +- src/doomdata.h | 1 + src/namedef.h | 1 + src/p_udmf.cpp | 4 ++++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/am_map.cpp b/src/am_map.cpp index 5b717e285..4cab453f7 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -2658,7 +2658,7 @@ void AM_drawWalls (bool allmap) AM_drawMline(&l, AMColors.TSWallColor); } } - else if (allmap) + else if (allmap || (line.flags & ML_REVEALED)) { if ((line.flags & ML_DONTDRAW) && (am_cheat == 0 || am_cheat >= 4)) { diff --git a/src/doomdata.h b/src/doomdata.h index 58bfea68a..38a65ca50 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -170,6 +170,7 @@ enum ELineFlags : unsigned ML_BLOCKSIGHT = 0x04000000, // blocks monster line of sight ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks ML_3DMIDTEX_IMPASS = 0x10000000, // [TP] if 3D midtex, behaves like a height-restricted ML_BLOCKING + ML_REVEALED = 0x20000000, // set if revealed in automap ML_PORTALCONNECT = 0x80000000, // for internal use only: This line connects to a sector with a linked portal (used to speed up sight checks.) }; diff --git a/src/namedef.h b/src/namedef.h index 9e6d3811a..05f2c55cb 100644 --- a/src/namedef.h +++ b/src/namedef.h @@ -537,6 +537,7 @@ xx(Repeatspecial) xx(Conversation) xx(Locknumber) xx(Midtex3dimpassible) +xx(Revealed) xx(Playercross) xx(Playeruse) diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 24a7fd5fd..f0d34c8ee 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -1107,6 +1107,10 @@ public: Flag(ld->flags, ML_3DMIDTEX_IMPASS, key); continue; + case NAME_Revealed: + Flag(ld->flags, ML_REVEALED, key); + continue; + case NAME_MoreIds: // delay parsing of the tag string until parsing of the sector is complete // This ensures that the ID is always the first tag in the list.