mirror of
https://github.com/JezuzLizard/T4SP-Server-Plugin.git
synced 2025-04-20 05:25:44 +00:00
Fix no negotation link path generation
This commit is contained in:
parent
4135e7653a
commit
42a3c64e97
@ -12,6 +12,43 @@ namespace test
|
||||
{
|
||||
game::dvar_s* custom_dvar;
|
||||
game::dvar_s* custom_string_dvar;
|
||||
|
||||
bool our_funny_call(game::pathnode_t* begin_node, game::pathnode_t* end_node, bool allowNeg)
|
||||
{
|
||||
if (!allowNeg && begin_node->constant.type == game::NODE_NEGOTIATION_BEGIN && end_node->constant.type == game::NODE_NEGOTIATION_END)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void __declspec(naked) our_funny_hook()
|
||||
{
|
||||
__asm
|
||||
{
|
||||
pushad;
|
||||
mov eax, [esp + 0x20 + 0x98 + 0x1C];
|
||||
push eax;
|
||||
push esi; // end
|
||||
push edi; // begin
|
||||
call our_funny_call;
|
||||
add esp, 0xC;
|
||||
test al, al;
|
||||
popad;
|
||||
|
||||
jnz og;
|
||||
|
||||
push 0x4D3400;
|
||||
retn;
|
||||
|
||||
og:
|
||||
mov ecx, 0x18F78D4;
|
||||
mov ecx, dword ptr [ecx]; // level.iSearchFrame
|
||||
push 0x4D329C;
|
||||
retn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class component final : public component_interface
|
||||
@ -45,6 +82,8 @@ namespace test
|
||||
});
|
||||
|
||||
|
||||
// fix NEGOTIATION links
|
||||
utils::hook::jump(0x4D3296, our_funny_hook);
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user