diff --git a/src/client/component/dedi_patches.cpp b/src/client/component/dedi_patches.cpp new file mode 100644 index 00000000..bc987c4e --- /dev/null +++ b/src/client/component/dedi_patches.cpp @@ -0,0 +1,28 @@ +#include +#include "loader/component_loader.hpp" + +#include "game/game.hpp" + +#include + +namespace patches +{ + namespace + { + void scr_are_textures_loaded_stub([[maybe_unused]] game::scriptInstance_t inst) + { + game::Scr_AddInt(game::SCRIPTINSTANCE_SERVER, 1); + } + } + + struct component final : server_component + { + void post_unpack() override + { + // Fix infinite loop + utils::hook::jump(0x1402E86B0_g, scr_are_textures_loaded_stub); + } + }; +} + +REGISTER_COMPONENT(patches::component) diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 5b06fa60..2c4110fa 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -74,6 +74,7 @@ namespace game }; // Scr + WEAK symbol Scr_AddInt{0x0, 0x14016F160}; WEAK symbol Scr_AddString{0x0, 0x14016F320}; WEAK symbol Scr_GetString{0x0, 0x140171490}; WEAK symbol Scr_Notify_Canon{0x0, 0x1402F5FF0};