From 1a860185ee763aa571db775eea4e227bd9ee3852 Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Fri, 29 Dec 2023 13:50:09 -0600 Subject: [PATCH] Exposed `viewactive`, allowing checks for overlay automaps. - Made `automapactive` UI scoped since checking this on the play side may cause desyncs. --- src/g_game.cpp | 1 + wadsrc/static/zscript/doombase.zs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index 397f9eb75d..81d12d080b 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -3154,6 +3154,7 @@ DEFINE_GLOBAL(globalfreeze) DEFINE_GLOBAL(gametic) DEFINE_GLOBAL(demoplayback) DEFINE_GLOBAL(automapactive); +DEFINE_GLOBAL(viewactive); DEFINE_GLOBAL(Net_Arbitrator); DEFINE_GLOBAL(netgame); DEFINE_GLOBAL(paused); diff --git a/wadsrc/static/zscript/doombase.zs b/wadsrc/static/zscript/doombase.zs index 141b2b0c24..9dd5e550b1 100644 --- a/wadsrc/static/zscript/doombase.zs +++ b/wadsrc/static/zscript/doombase.zs @@ -8,7 +8,8 @@ extend struct _ native readonly Array<@TerrainDef> Terrains; native int validcount; native play @DehInfo deh; - native readonly bool automapactive; + native readonly ui bool automapactive; // is automap enabled? + native readonly ui bool viewactive; // if automap is active, true = main automap, false = overlay automap. native readonly TextureID skyflatnum; native readonly int gametic; native readonly int Net_Arbitrator;