mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-30 16:00:55 +00:00
- Enable arg0str for UDMF things and named scripts.
SVN r3390 (trunk)
This commit is contained in:
parent
7106c06811
commit
3fae0e3906
2 changed files with 20 additions and 0 deletions
|
@ -199,6 +199,12 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
conversation = <int> // Assigns a conversation dialogue to this thing.
|
||||
// Parameter is the conversation ID, 0 meaning none.
|
||||
countsecret = <bool>; // Picking up this actor counts as a secret.
|
||||
arg0str = <string>; // 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
|
||||
===============================================================================
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue