- fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'.
With the stricter type checks of the self pointer that were now implemented these all produced errors.
This commit is contained in:
parent
7d49a82963
commit
a2f4cd7cda
38 changed files with 185 additions and 237 deletions
|
|
@ -2317,7 +2317,14 @@ FxExpression *ZCCCompiler::SetupActionFunction(PClass *cls, ZCC_TreeNode *af)
|
|||
{
|
||||
FArgumentList argumentlist;
|
||||
// We can use this function directly without wrapping it in a caller.
|
||||
return new FxVMFunctionCall(new FxSelf(*af), afd, argumentlist, *af, false);
|
||||
if ((afd->Variants[0].Flags & VARF_Action) || !cls->IsDescendantOf(RUNTIME_CLASS(AStateProvider)) || !afd->Variants[0].SelfClass->IsDescendantOf(RUNTIME_CLASS(AStateProvider)))
|
||||
{
|
||||
return new FxVMFunctionCall(new FxSelf(*af), afd, argumentlist, *af, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(af, "Cannot use non-action function %s here.", FName(id->Identifier).GetChars());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue