From e90473e7d9c9fd53436f5a9f1788ec5769d077f8 Mon Sep 17 00:00:00 2001 From: MaxED Date: Mon, 3 Jun 2013 11:32:29 +0000 Subject: [PATCH] "thingflagstranslation" block was missing from UDMF game configuration, so thing flags were dropped when map format was changed to UDMF. --- Build/Configurations/Includes/Doom_misc.cfg | 6 ++--- .../Configurations/Includes/ZDoom_common.cfg | 22 ++++++++++++++----- Build/Configurations/Includes/ZDoom_misc.cfg | 3 +++ Source/Core/Config/GameConfiguration.cs | 16 ++++++-------- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/Build/Configurations/Includes/Doom_misc.cfg b/Build/Configurations/Includes/Doom_misc.cfg index 2ff859cc..ac409c49 100644 --- a/Build/Configurations/Includes/Doom_misc.cfg +++ b/Build/Configurations/Includes/Doom_misc.cfg @@ -93,9 +93,9 @@ linedefflagstranslation // When the UDMF field name is prefixed with ! it is inverted thingflagstranslation { - 1 = "skill1"; - 2 = "skill2"; - 4 = "skill3"; + 1 = "skill1,skill2"; + 2 = "skill3"; + 4 = "skill4,skill5"; 8 = "ambush"; 16 = "!single"; } diff --git a/Build/Configurations/Includes/ZDoom_common.cfg b/Build/Configurations/Includes/ZDoom_common.cfg index 783481ca..a44b6c11 100644 --- a/Build/Configurations/Includes/ZDoom_common.cfg +++ b/Build/Configurations/Includes/ZDoom_common.cfg @@ -369,12 +369,22 @@ mapformat_udmf } - // How to compare thing flags (for the stuck things error checker) - thingflagscompare - { - include("UDMF_misc.cfg", "thingflagscompare"); - include("ZDoom_misc.cfg", "thingflagscompare_udmf"); - } + // How to compare thing flags (for the stuck things error checker) + thingflagscompare + { + include("UDMF_misc.cfg", "thingflagscompare"); + include("ZDoom_misc.cfg", "thingflagscompare_udmf"); + } + + //mxd. Thing flags UDMF translation table + // This is needed for copy/paste and prefabs to work properly + // When the UDMF field name is prefixed with ! it is inverted + thingflagstranslation + { + include("Doom_misc.cfg", "thingflagstranslation"); + include("Hexen_misc.cfg", "thingflagstranslation"); + include("ZDoom_misc.cfg", "thingflagstranslation"); + } // Things flags masks include("Hexen_misc.cfg", "thingflagsmasks"); diff --git a/Build/Configurations/Includes/ZDoom_misc.cfg b/Build/Configurations/Includes/ZDoom_misc.cfg index 7220b820..004934a7 100644 --- a/Build/Configurations/Includes/ZDoom_misc.cfg +++ b/Build/Configurations/Includes/ZDoom_misc.cfg @@ -76,6 +76,9 @@ thingflags_udmf // When the UDMF field name is prefixed with ! it is inverted thingflagstranslation { + 256 = "single"; + 512 = "coop"; + 1024 = "dm"; 2048 = "translucent"; 4096 = "invisible"; 8192 = "friend"; diff --git a/Source/Core/Config/GameConfiguration.cs b/Source/Core/Config/GameConfiguration.cs index 279e7567..876d871c 100644 --- a/Source/Core/Config/GameConfiguration.cs +++ b/Source/Core/Config/GameConfiguration.cs @@ -712,16 +712,14 @@ namespace CodeImp.DoomBuilder.Config thingflagstranslation.Add(new FlagTranslation(de)); // Get thing compare flag info (for the stuck thing error checker - dic = cfg.ReadSetting("thingflagscompare", new Hashtable()); - foreach (DictionaryEntry de in dic) - { - IDictionary gdic = cfg.ReadSetting("thingflagscompare." + de.Key, new Hashtable()); + dic = cfg.ReadSetting("thingflagscompare", new Hashtable()); + foreach(DictionaryEntry de in dic) { + IDictionary gdic = cfg.ReadSetting("thingflagscompare." + de.Key, new Hashtable()); - foreach (DictionaryEntry gde in gdic) - { - thingflagscompare.Add(new ThingFlagsCompare(cfg, de.Key.ToString(), gde.Key.ToString())); - } - } + foreach(DictionaryEntry gde in gdic) { + thingflagscompare.Add(new ThingFlagsCompare(cfg, de.Key.ToString(), gde.Key.ToString())); + } + } // Sort the translation flags, because they must be compared highest first! thingflagstranslation.Sort();