diff --git a/specs/udmf_zdoom.txt b/specs/udmf_zdoom.txt index d56b8ed0b..9d7bb3caf 100644 --- a/specs/udmf_zdoom.txt +++ b/specs/udmf_zdoom.txt @@ -199,6 +199,12 @@ Note: All fields default to false unless mentioned otherwise. conversation = // Assigns a conversation dialogue to this thing. // Parameter is the conversation ID, 0 meaning none. countsecret = ; // Picking up this actor counts as a secret. + arg0str = ; // Alternate string-based version of arg0 + + * Note about arg0str + + For things with ACS specials (80-86 and 226), if arg0str is present and non-null, it + will be used as the name of the script to execute, and arg0 will be ignored. } @@ -316,6 +322,9 @@ Standardized whitespace. 1.19 24.02.2012 Added back locknumber property. +1.20 25.02.2012 +Added arg0str thing property. + =============================================================================== EOF =============================================================================== diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index ab0a3e8af..cf130f267 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -466,6 +466,8 @@ public: void ParseThing(FMapThing *th) { + FString arg0str; + memset(th, 0, sizeof(*th)); sc.MustGetToken('{'); while (!sc.CheckToken('}')) @@ -516,6 +518,11 @@ public: th->args[int(key)-int(NAME_Arg0)] = CheckInt(key); break; + case NAME_Arg0Str: + CHECK_N(Zd); + arg0str = CheckString(key); + break; + case NAME_Skill1: case NAME_Skill2: case NAME_Skill3: @@ -616,6 +623,10 @@ public: break; } } + if (arg0str.IsNotEmpty() && P_IsACSSpecial(th->special)) + { + th->args[0] = -FName(arg0str); + } // Thing specials are only valid in namespaces with Hexen-type specials // and in ZDoomTranslated - which will use the translator on them. if (namespc == NAME_ZDoomTranslated)