From 3ca54a6ce6719041c491dc92d4ae71f04ae834cd Mon Sep 17 00:00:00 2001 From: praydog Date: Tue, 22 Oct 2024 21:00:45 -0700 Subject: [PATCH] Lua: Allow passing of StructObject to DANGEROUS_call_member_virtual --- lua-api/lib/src/ScriptContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua-api/lib/src/ScriptContext.cpp b/lua-api/lib/src/ScriptContext.cpp index bfd77ef3..42cfbc0d 100644 --- a/lua-api/lib/src/ScriptContext.cpp +++ b/lua-api/lib/src/ScriptContext.cpp @@ -555,6 +555,8 @@ int ScriptContext::setup_bindings() { // Only support basic arguments for now until we can test this more if (args[i].is()) { args_ptr[i] = args[i].as(); + } else if (args[i].is()) { + args_ptr[i] = args[i].as()->object; } else { // We dont support floats for now because we'd need to JIT the function call throw sol::error("DANGEROUS_call_member_virtual: Invalid argument type");