diff --git a/src/fragglescript/t_func.cpp b/src/fragglescript/t_func.cpp index 1d6fd1807..d5b6592c2 100644 --- a/src/fragglescript/t_func.cpp +++ b/src/fragglescript/t_func.cpp @@ -1768,7 +1768,7 @@ class DLightLevel : public DLighting unsigned char destlevel; unsigned char speed; - DLightLevel() {} + DLightLevel() = default; public: diff --git a/src/scripting/backend/vmbuilder.cpp b/src/scripting/backend/vmbuilder.cpp index 58ff1b6ae..b10f968ef 100644 --- a/src/scripting/backend/vmbuilder.cpp +++ b/src/scripting/backend/vmbuilder.cpp @@ -974,7 +974,7 @@ void FunctionCallEmitter::AddParameter(ExpEmit &emit, bool reference) } emitters.push_back([=](VMFunctionBuilder *build) ->int { - build->Emit(OP_PARAM, emit.RegType + (reference * REGT_ADDROF), emit.RegNum); + build->Emit(OP_PARAM, emit.RegType + (reference * REGT_ADDROF) + (emit.Konst * REGT_KONST), emit.RegNum); auto op = emit; op.Free(build); return emit.RegCount; diff --git a/src/scripting/thingdef.cpp b/src/scripting/thingdef.cpp index 439bf8ce8..261b07f72 100644 --- a/src/scripting/thingdef.cpp +++ b/src/scripting/thingdef.cpp @@ -236,7 +236,7 @@ PFunction *CreateAnonymousFunction(PContainerType *containingclass, PType *retur // //========================================================================== -PFunction *FindClassMemberFunction(PContainerType *selfcls, PContainerType *funccls, FName name, FScriptPosition &sc, bool *error, const VersionInfo &version) +PFunction *FindClassMemberFunction(PContainerType *selfcls, PContainerType *funccls, FName name, FScriptPosition &sc, bool *error, const VersionInfo &version, bool nodeprecated) { // Skip ACS_NamedExecuteWithResult. Anything calling this should use the builtin instead. if (name == NAME_ACS_NamedExecuteWithResult) return nullptr; @@ -263,7 +263,8 @@ PFunction *FindClassMemberFunction(PContainerType *selfcls, PContainerType *func { sc.Message(MSG_ERROR, "%s is declared protected and not accessible", symbol->SymbolName.GetChars()); } - else if ((funcsym->Variants[0].Flags & VARF_Deprecated) && funcsym->mVersion <= version) + // ZScript will skip this because it prints its own message. + else if ((funcsym->Variants[0].Flags & VARF_Deprecated) && funcsym->mVersion <= version && !nodeprecated) { sc.Message(MSG_WARNING, "Call to deprecated function %s", symbol->SymbolName.GetChars()); } diff --git a/src/scripting/thingdef.h b/src/scripting/thingdef.h index 4a2384538..4ab496c41 100644 --- a/src/scripting/thingdef.h +++ b/src/scripting/thingdef.h @@ -204,7 +204,7 @@ class FxVMFunctionCall *ParseAction(FScanner &sc, FState state, FString statestr FName CheckCastKludges(FName in); void SetImplicitArgs(TArray *args, TArray *argflags, TArray *argnames, PContainerType *cls, uint32_t funcflags, int useflags); PFunction *CreateAnonymousFunction(PContainerType *containingclass, PType *returntype, int flags); -PFunction *FindClassMemberFunction(PContainerType *cls, PContainerType *funccls, FName name, FScriptPosition &sc, bool *error, const VersionInfo &version); +PFunction *FindClassMemberFunction(PContainerType *cls, PContainerType *funccls, FName name, FScriptPosition &sc, bool *error, const VersionInfo &version, bool nodeprecated = false); void CreateDamageFunction(PNamespace *ns, const VersionInfo &ver, PClassActor *info, AActor *defaults, FxExpression *id, bool fromDecorate, int lumpnum); //==========================================================================