fix infinite loop
This commit is contained in:
parent
37edda91d9
commit
15fdb6340f
32
src/client/component/patches.cpp
Normal file
32
src/client/component/patches.cpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct component final : generic_component
|
||||||
|
{
|
||||||
|
void post_unpack() override
|
||||||
|
{
|
||||||
|
if (game::is_server())
|
||||||
|
{
|
||||||
|
// Fix infinite loop
|
||||||
|
utils::hook::jump(0x1402E86B0_g, scr_are_textures_loaded_stub);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
REGISTER_COMPONENT(patches::component)
|
@ -74,6 +74,7 @@ namespace game
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Scr
|
// Scr
|
||||||
|
WEAK symbol<void(scriptInstance_t inst, int value)> Scr_AddInt{0x0, 0x14016F160};
|
||||||
WEAK symbol<void(scriptInstance_t inst, const char* value)> Scr_AddString{0x0, 0x14016F320};
|
WEAK symbol<void(scriptInstance_t inst, const char* value)> Scr_AddString{0x0, 0x14016F320};
|
||||||
WEAK symbol<const char* (scriptInstance_t inst, unsigned int index)> Scr_GetString{0x0, 0x140171490};
|
WEAK symbol<const char* (scriptInstance_t inst, unsigned int index)> Scr_GetString{0x0, 0x140171490};
|
||||||
WEAK symbol<void(gentity_s* ent, ScrVarCanonicalName_t stringValue, unsigned int paramcount)> Scr_Notify_Canon{0x0, 0x1402F5FF0};
|
WEAK symbol<void(gentity_s* ent, ScrVarCanonicalName_t stringValue, unsigned int paramcount)> Scr_Notify_Canon{0x0, 0x1402F5FF0};
|
||||||
|
Loading…
Reference in New Issue
Block a user