diff --git a/src/client/component/loadscreen.cpp b/src/client/component/loadscreen.cpp index 368b3192..e78300c7 100644 --- a/src/client/component/loadscreen.cpp +++ b/src/client/component/loadscreen.cpp @@ -92,7 +92,7 @@ namespace loadscreen void draw_loadscreen_title() { auto x = -20.f; - auto y = 290.f; + auto y = 288.f; auto h = 24.f; auto w = 0.f; diff --git a/src/client/component/notifies.cpp b/src/client/component/notifies.cpp index 2834b967..40b5358c 100644 --- a/src/client/component/notifies.cpp +++ b/src/client/component/notifies.cpp @@ -7,6 +7,7 @@ #include "game/scripting/lua/value_conversion.hpp" #include "game/scripting/lua/error.hpp" #include "notifies.hpp" +#include "scripting.hpp" #include @@ -199,7 +200,18 @@ namespace notifies void clear_callbacks() { - vm_execute_hooks.clear(); + for (auto i = vm_execute_hooks.begin(); i != vm_execute_hooks.end();) + { + if (i->second.is_lua_hook) + { + i = vm_execute_hooks.erase(i); + } + else + { + ++i; + } + } + entity_damage_callbacks.clear(); } @@ -237,6 +249,14 @@ namespace notifies utils::hook::jump(0x1405C90A5, utils::hook::assemble(vm_execute_stub), true); scr_entity_damage_hook.create(0x1404BD2E0, scr_entity_damage_stub); + + scripting::on_shutdown([](bool free_scripts) + { + if (free_scripts) + { + vm_execute_hooks.clear(); + } + }); } }; } diff --git a/src/client/game/scripting/script_value.cpp b/src/client/game/scripting/script_value.cpp index 502798ae..1b7d7513 100644 --- a/src/client/game/scripting/script_value.cpp +++ b/src/client/game/scripting/script_value.cpp @@ -197,7 +197,8 @@ namespace scripting template <> bool script_value::is() const { - return this->get_raw().type == game::SCRIPT_STRING; + const auto type = this->get_raw().type; + return type == game::SCRIPT_STRING || type == game::SCRIPT_ISTRING; } template <> @@ -215,7 +216,8 @@ namespace scripting template <> std::string script_value::get() const { - return this->get(); + const auto localized = this->get_raw().type == game::SCRIPT_ISTRING; + return (localized ? "&"s : ""s) + this->get(); } /***************************************************************