From ba62a86c80c58c7a78935e925be59606195e6302 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 14 Nov 2016 15:48:34 +0100 Subject: [PATCH] - fixed: A_SetInventory still had default initializers. --- src/p_actionfunctions.cpp | 4 ++-- src/scripting/codegeneration/codegen.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/p_actionfunctions.cpp b/src/p_actionfunctions.cpp index ff7aa2af6..d61dc100c 100644 --- a/src/p_actionfunctions.cpp +++ b/src/p_actionfunctions.cpp @@ -2464,8 +2464,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetInventory) PARAM_SELF_PROLOGUE(AActor); PARAM_CLASS(itemtype, AInventory); PARAM_INT(amount); - PARAM_INT_DEF(ptr) { ptr = AAPTR_DEFAULT; } - PARAM_BOOL_DEF(beyondMax) { beyondMax = false; } + PARAM_INT_DEF(ptr); + PARAM_BOOL_DEF(beyondMax); bool res = false; diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 103e38eff..89b3a81a3 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -8299,7 +8299,7 @@ FxExpression *FxMultiNameState::Resolve(FCompileContext &ctx) delete this; return nullptr; } - else if (!scope->IsAncestorOf(ctx.Class) && ctx.Class != RUNTIME_CLASS(AActor)) // AActor needs access to subclasses in a few places. TBD: Relax this for non-action functions? + else if (!scope->IsAncestorOf(ctx.Class)) { ScriptPosition.Message(MSG_ERROR, "'%s' is not an ancestor of '%s'", names[0].GetChars(), ctx.Class->TypeName.GetChars()); delete this;