From a28780948b45b2a78c756e3c938e96d355955e79 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Wed, 13 Mar 2024 20:50:39 +0100 Subject: [PATCH] Make minimap ignore certain automap settings. --- language.version | 4 ++-- zscript/hud/swwm_hud_topstuff.zsc | 33 +++++++++++-------------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/language.version b/language.version index db0eaf786..0b0b85b4f 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1109 \cu(Wed 6 Mar 20:03:50 CET 2024)\c-"; -SWWM_SHORTVER="\cw1.3pre r1109 \cu(2024-03-06 20:03:50)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1110 \cu(Wed 13 Mar 20:50:39 CET 2024)\c-"; +SWWM_SHORTVER="\cw1.3pre r1110 \cu(2024-03-13 20:50:39)\c-"; diff --git a/zscript/hud/swwm_hud_topstuff.zsc b/zscript/hud/swwm_hud_topstuff.zsc index 2b7d62ae7..cdf7afe11 100644 --- a/zscript/hud/swwm_hud_topstuff.zsc +++ b/zscript/hud/swwm_hud_topstuff.zsc @@ -246,17 +246,7 @@ extend Class SWWMStatusBar return false; } // just check normal specials - if ( !special || (am_showtriggerlines == 0) ) return false; - if ( !ShouldDisplaySpecial(special) ) return false; - if ( special && (am_showtriggerlines >= 2) ) return true; - if ( (special == Door_Open) - || (special == Door_Close) - || (special == Door_CloseWaitOpen) - || (special == Door_Raise) - || (special == Door_Animated) - || (special == Generic_Door) ) - return false; - return true; + return (special && ShouldDisplaySpecial(special)); } private bool CheckSectorAction( Sector s, int type, bool useonly ) { @@ -304,13 +294,13 @@ extend Class SWWMStatusBar return 0; if ( l.frontsector && (l.frontsector.flags&Sector.SECF_WASSECRET) ) { - if ( am_map_secrets && !(l.frontsector.flags&Sector.SECF_SECRET) ) return 1; - if ( (am_map_secrets == 2) && !(l.flags&Line.ML_SECRET) ) return 2; + if ( !(l.frontsector.flags&Sector.SECF_SECRET) ) return 1; + if ( !(l.flags&Line.ML_SECRET) ) return 2; } if ( l.backsector && (l.backsector.flags&Sector.SECF_WASSECRET) ) { - if ( am_map_secrets && !(l.backsector.flags&Sector.SECF_SECRET) ) return 1; - if ( (am_map_secrets == 2) && !(l.flags&Line.ML_SECRET) ) return 2; + if ( !(l.backsector.flags&Sector.SECF_SECRET) ) return 1; + if ( !(l.flags&Line.ML_SECRET) ) return 2; } return 0; } @@ -423,15 +413,15 @@ extend Class SWWMStatusBar { int secwit = CheckSecret(l); int lock = SWWMUtility.GetLineLock(l); - if ( (l.flags&Line.ML_SECRET) && !level.allmap ) // allmap will reveal these + if ( (l.flags&Line.ML_SECRET) && (am_cheat || !level.allmap) ) // allmap will reveal these { - if ( am_cheat && l.backsector && mm_secretwallcolor ) + if ( am_cheat && l.backsector ) col = mm_secretwallcolor; - else col = mm_wallcolor; + else col = (secwit==2)?mm_unexploredsecretcolor:(secwit==1)?mm_secretsectorcolor:mm_wallcolor; } - else if ( mm_interlevelcolor && CheckExitLine(l) ) + else if ( CheckExitLine(l) ) col = mm_interlevelcolor; - else if ( mm_intralevelcolor && CheckTeleportLine(l) ) + else if ( CheckTeleportLine(l) ) col = mm_intralevelcolor; else if ( (lock > 0) && (lock < 256) ) { @@ -460,8 +450,7 @@ extend Class SWWMStatusBar else if ( lcol != -1 ) col = lcol; else col = mm_lockedcolor; } - else if ( mm_specialwallcolor && CheckTriggerLine(l) ) - col = mm_specialwallcolor; + else if ( CheckTriggerLine(l) ) col = mm_specialwallcolor; else if ( secwit == 1 ) col = mm_secretsectorcolor; // locked doors and trigger lines take priority over secrets else if ( secwit == 2 ) col = mm_unexploredsecretcolor; else if ( l.frontsector && l.backsector )