mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-07-03 17:51:51 +00:00
gsc hook safe set
This commit is contained in:
@ -170,6 +170,7 @@ namespace signatures
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#define SAFE_SET_PLUTO_SYMBOL_DOUBLE(name, addr, off) \
|
||||
addr2 = reinterpret_cast<size_t>(utils::hook::get_displacement_addr(addr)); \
|
||||
if (!addr_is_in_image_space(addr2)) \
|
||||
@ -186,6 +187,16 @@ namespace signatures
|
||||
game::plutonium::name.set(addr1)
|
||||
|
||||
|
||||
#define SAFE_SET_PLUTO_SYMBOL(name, addr) \
|
||||
addr1 = reinterpret_cast<size_t>(utils::hook::get_displacement_addr(addr)); \
|
||||
if (!addr_is_in_image_space(addr1)) \
|
||||
{ \
|
||||
err_reason = #name; \
|
||||
return false; \
|
||||
} \
|
||||
game::plutonium::name.set(addr1)
|
||||
|
||||
|
||||
bool handle_funcs()
|
||||
{
|
||||
size_t addr1;
|
||||
@ -199,6 +210,9 @@ namespace signatures
|
||||
SAFE_SET_PLUTO_SYMBOL_DOUBLE(scr_execentthread_update_codepos_func, 0x699640, 0x7);
|
||||
SAFE_SET_PLUTO_SYMBOL_DOUBLE(scr_addexecthread_update_codepos_func, 0x699730, 0x7);
|
||||
|
||||
SAFE_SET_PLUTO_SYMBOL(scr_get_function_stub, 0x682D99);
|
||||
SAFE_SET_PLUTO_SYMBOL(scr_get_method_stub, 0x683043);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user