diff --git a/src/client/game/scripting/execution.cpp b/src/client/game/scripting/execution.cpp index 1380ab1e..f0e236da 100644 --- a/src/client/game/scripting/execution.cpp +++ b/src/client/game/scripting/execution.cpp @@ -16,14 +16,6 @@ namespace scripting return value_ptr; } - void push_value(const script_value& value) - { - auto* value_ptr = allocate_argument(); - *value_ptr = value.get_raw(); - - game::AddRefToValue(value_ptr->type, value_ptr->u); - } - int get_field_id(const int classnum, const std::string& field) { if (scripting::fields_table[classnum].find(field) != scripting::fields_table[classnum].end()) @@ -49,6 +41,14 @@ namespace scripting } } + void push_value(const script_value& value) + { + auto* value_ptr = allocate_argument(); + *value_ptr = value.get_raw(); + + game::AddRefToValue(value_ptr->type, value_ptr->u); + } + void notify(const entity& entity, const std::string& event, const std::vector& arguments) { stack_isolation _; @@ -110,7 +110,7 @@ namespace scripting stack_isolation _; for (auto i = arguments.rbegin(); i != arguments.rend(); ++i) { - scripting::push_value(*i); + push_value(*i); } game::AddRefToObject(id);