- Added support for using named scripts with UDMF maps. On lines with ACS specials

(i.e. ACS_Execute, etc.), set the arg0str property to the name of the script to execute. The
  standard numeric arg0 property will be ignored in this case.

SVN r3372 (trunk)
This commit is contained in:
Randy Heit 2012-02-18 02:39:01 +00:00
commit d9b8b344ff
5 changed files with 76 additions and 52 deletions

View file

@ -651,6 +651,7 @@ public:
{
bool passuse = false;
bool strifetrans = false;
FString arg0str;
memset(ld, 0, sizeof(*ld));
ld->Alpha = FRACUNIT;
@ -706,6 +707,11 @@ public:
ld->args[int(key)-int(NAME_Arg0)] = CheckInt(key);
continue;
case NAME_Arg0Str:
CHECK_N(Zd);
arg0str = CheckString(key);
continue;
case NAME_Blocking:
Flag(ld->flags, ML_BLOCKING, key);
continue;
@ -877,17 +883,17 @@ public:
Flag(ld->flags, ML_BLOCKUSE, key);
continue;
case NAME_blocksight:
Flag(ld->flags, ML_BLOCKSIGHT, key);
continue;
// [Dusk] lock number
case NAME_Locknumber:
ld->locknumber = CheckInt(key);
continue;
default:
break;
case NAME_blocksight:
Flag(ld->flags, ML_BLOCKSIGHT, key);
continue;
// [Dusk] lock number
case NAME_Locknumber:
ld->locknumber = CheckInt(key);
continue;
default:
break;
}
if (!strnicmp("user_", key.GetChars(), 5))
@ -920,6 +926,10 @@ public:
ld->sidedef[0] = (side_t*)(intptr_t)(1);
Printf("Line %d has no first side.\n", index);
}
if (arg0str.IsNotEmpty() && P_IsACSSpecial(ld->special))
{
ld->args[0] = -FName(arg0str);
}
}
//===========================================================================