diff --git a/src/client/component/gsc.cpp b/src/client/component/gsc.cpp index d82e4455..c094eddb 100644 --- a/src/client/component/gsc.cpp +++ b/src/client/component/gsc.cpp @@ -356,9 +356,7 @@ namespace gsc return {}; } - const auto value = &game::scr_VmPub->top[-index]; - - return scripting::script_value(*value); + return game::scr_VmPub->top[-index]; } auto function_id_start = 0x320; @@ -379,7 +377,7 @@ namespace gsc void execute_custom_function(scripting::script_function function) { - bool error = false; + auto error = false; try { @@ -400,7 +398,7 @@ namespace gsc void vm_call_builtin_stub(scripting::script_function function) { - bool custom = false; + auto custom = false; { custom = functions.find(function) != functions.end(); } diff --git a/src/client/game/scripting/functions.cpp b/src/client/game/scripting/functions.cpp index 5b7720f1..12680dc2 100644 --- a/src/client/game/scripting/functions.cpp +++ b/src/client/game/scripting/functions.cpp @@ -64,7 +64,7 @@ namespace scripting static const auto function_table = &gsc::func_table; static const auto method_table = 0x14B155890; - if (index < 0x320) + if (index < 0x1000) { return reinterpret_cast(function_table)[index - 1]; }