diff --git a/src/scripting/decorate/thingdef_exp.cpp b/src/scripting/decorate/thingdef_exp.cpp index 4a1a82922..9b78a5f28 100644 --- a/src/scripting/decorate/thingdef_exp.cpp +++ b/src/scripting/decorate/thingdef_exp.cpp @@ -510,7 +510,8 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls) sc.UnGet(); ParseFunctionParameters(sc, cls, args, func, "", nullptr); } - return new FxVMFunctionCall(new FxSelf(sc), func, args, sc, false); + // FxVMFunctionCall cannot be used here as it lacks some important checks + return new FxFunctionCall(identifier, NAME_None, args, sc); } }