- fixed: Non-Actors cannot act as activators for action specials and must pass null when acticating one.

This commit is contained in:
Christoph Oelckers 2016-12-11 21:39:35 +01:00
parent e61ae9a1f9
commit 77d9978b27

View file

@ -7083,7 +7083,7 @@ FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx)
delete this;
return nullptr;
}
FxExpression *self = (ctx.Function && ctx.Function->Variants[0].Flags & VARF_Method) ? new FxSelf(ScriptPosition) : (FxExpression*)new FxConstant(ScriptPosition);
FxExpression *self = (ctx.Function && (ctx.Function->Variants[0].Flags & VARF_Method) && ctx.Class->IsKindOf(RUNTIME_CLASS(PClassActor))) ? new FxSelf(ScriptPosition) : (FxExpression*)new FxConstant(ScriptPosition);
FxExpression *x = new FxActionSpecialCall(self, special, ArgList, ScriptPosition);
delete this;
return x->Resolve(ctx);