Skip to content

Commit

Permalink
Lua: Allow passing of StructObject to DANGEROUS_call_member_virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 23, 2024
1 parent 2e3d81f commit 3ca54a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua-api/lib/src/ScriptContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,8 @@ int ScriptContext::setup_bindings() {
// Only support basic arguments for now until we can test this more
if (args[i].is<uevr::API::UObject*>()) {
args_ptr[i] = args[i].as<uevr::API::UObject*>();
} else if (args[i].is<lua::datatypes::StructObject*>()) {
args_ptr[i] = args[i].as<lua::datatypes::StructObject*>()->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");
Expand Down

0 comments on commit 3ca54a6

Please sign in to comment.