- Added a NODELAY state flag. This is only valid for a state immediately following a Spawn label.

When set, the actor will run this state during its first tick. This means Spawn
  states may now run an action function if you set this flag. Note that this action function
  is executed during the actor's first tick, which is not the same as when it is spawned.

SVN r4240 (trunk)
This commit is contained in:
Randy Heit 2013-04-30 04:20:09 +00:00
commit 0e19a0e330
6 changed files with 65 additions and 21 deletions

View file

@ -275,6 +275,18 @@ do_stop:
state.Fast = true;
continue;
}
if (sc.Compare("NODELAY"))
{
if (bag.statedef.GetStateLabelIndex(NAME_Spawn) == bag.statedef.GetStateCount())
{
state.NoDelay = true;
}
else
{
sc.ScriptMessage("NODELAY may only be used immediately after Spawn:");
}
continue;
}
if (sc.Compare("OFFSET"))
{
// specify a weapon offset
@ -338,8 +350,7 @@ do_stop:
int paramindex = PrepareStateParameters(&state, numparams, bag.Info->Class);
int paramstart = paramindex;
bool varargs = params[numparams - 1] == '+';
int varargcount=0;
int varargcount = 0;
if (varargs)
{