mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 05:01:41 +00:00
- 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:
parent
cbf7162e16
commit
d9b8b344ff
5 changed files with 76 additions and 52 deletions
|
@ -113,7 +113,12 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
blockprojectiles = <bool>;// Line blocks all projectiles
|
||||
blockuse = <bool>; // Line blocks all use actions
|
||||
blocksight = <bool>; // Line blocks monster line of sight
|
||||
arg0str = <string>; // Alternate string-based version of arg0
|
||||
|
||||
* Note about arg0str
|
||||
|
||||
For lines 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.
|
||||
}
|
||||
|
||||
sidedef
|
||||
|
@ -303,6 +308,10 @@ Removed remarks of 8 being the maximum number of player classes/skill levels the
|
|||
Added renderstyleceiling and renderstylefloor sector properties
|
||||
Added Sector_Set3DFloor to list of specials that need to be handled for line ID remapping
|
||||
|
||||
1.18 17.02.2012
|
||||
Added arg0str linedef property.
|
||||
Standardized whitespace.
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
===============================================================================
|
||||
|
|
|
@ -292,6 +292,7 @@ xx(Arg1)
|
|||
xx(Arg2)
|
||||
xx(Arg3)
|
||||
xx(Arg4)
|
||||
xx(Arg0Str)
|
||||
xx(Id)
|
||||
xx(V1)
|
||||
xx(V2)
|
||||
|
|
|
@ -198,6 +198,11 @@ typedef int (*lnSpecFunc)(struct line_t *line,
|
|||
extern lnSpecFunc LineSpecials[256];
|
||||
|
||||
extern BYTE NamedACSToNormalACS[7];
|
||||
static inline bool P_IsACSSpecial(int specnum)
|
||||
{
|
||||
return (specnum >= ACS_Execute && specnum <= ACS_LockedExecuteDoor) ||
|
||||
specnum == ACS_ExecuteAlways;
|
||||
}
|
||||
|
||||
int P_FindLineSpecial (const char *string, int *min_args=NULL, int *max_args=NULL);
|
||||
bool P_ActivateThingSpecial(AActor * thing, AActor * trigger, bool death=false);
|
||||
|
|
|
@ -396,8 +396,7 @@ void P_SerializeWorld (FArchive &arc)
|
|||
<< li->special
|
||||
<< li->Alpha
|
||||
<< li->id;
|
||||
if ((li->special >= ACS_Execute && li->special <= ACS_LockedExecuteDoor) ||
|
||||
li->special == ACS_ExecuteAlways)
|
||||
if (P_IsACSSpecial(li->special))
|
||||
{
|
||||
P_SerializeACSScriptNumber(arc, li->args[0], false);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
Loading…
Reference in a new issue