2023-01-09 17:03:43 -05:00
|
|
|
#include <std_include.hpp>
|
|
|
|
#include "loader/component_loader.hpp"
|
|
|
|
|
|
|
|
#include "game/game.hpp"
|
|
|
|
|
|
|
|
#include <utils/hook.hpp>
|
|
|
|
|
|
|
|
namespace patches
|
|
|
|
{
|
|
|
|
namespace
|
|
|
|
{
|
|
|
|
void scr_are_textures_loaded_stub([[maybe_unused]] game::scriptInstance_t inst)
|
|
|
|
{
|
|
|
|
game::Scr_AddInt(game::SCRIPTINSTANCE_SERVER, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-09 17:23:29 -05:00
|
|
|
struct component final : server_component
|
2023-01-09 17:03:43 -05:00
|
|
|
{
|
|
|
|
void post_unpack() override
|
|
|
|
{
|
2023-01-09 17:23:29 -05:00
|
|
|
// Fix infinite loop
|
|
|
|
utils::hook::jump(0x1402E86B0_g, scr_are_textures_loaded_stub);
|
2023-01-09 17:03:43 -05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
REGISTER_COMPONENT(patches::component)
|