- fixed: The states parser tried to simplify the head node for random duration but it has to simplify the two value nodes separately.

- added jump by index to ZScript.
This commit is contained in:
Christoph Oelckers 2016-11-05 00:39:00 +01:00
commit b6633bc489
6 changed files with 40 additions and 10 deletions

View file

@ -322,7 +322,7 @@ do_stop:
endofstate:
if (ScriptCode != nullptr)
{
auto funcsym = CreateAnonymousFunction(actor, nullptr, VARF_Method | VARF_Action);
auto funcsym = CreateAnonymousFunction(actor, nullptr, VARF_Method | VARF_Action, (int)statestring.Len());
state.ActionFunc = FunctionBuildList.AddFunction(funcsym, ScriptCode, FStringf("%s.StateFunction.%d", actor->TypeName.GetChars(), bag.statedef.GetStateCount()), true);
}
int count = bag.statedef.AddStates(&state, statestring);