- fixed and cleaned up state index jump handling

* use the function build list instead of the function to pass the info. The function is permanent so not the best place for compile-time info.
 * pass along the current state index which is needed to calculate the target state.
This commit is contained in:
Christoph Oelckers 2016-11-06 13:14:46 +01:00
parent c354000f1c
commit 2ac0046cda
9 changed files with 24 additions and 18 deletions

View file

@ -106,13 +106,15 @@ class FFunctionBuildList
PPrototype *Proto = nullptr;
VMScriptFunction *Function = nullptr;
FString PrintableName;
int StateIndex;
int StateCount;
bool FromDecorate;
};
TArray<Item> mItems;
public:
VMFunction *AddFunction(PFunction *func, FxExpression *code, const FString &name, bool fromdecorate);
VMFunction *AddFunction(PFunction *func, FxExpression *code, const FString &name, bool fromdecorate, int currentstate = -1, int statecnt = 0);
void Build();
};