mirror of
https://github.com/0TheSpy/Seaside.git
synced 2025-01-11 03:32:10 +08:00
Delete netchannel.hpp
This commit is contained in:
parent
26ddf966a9
commit
6df55c4408
@ -1,36 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
typedef const void(__thiscall* pShutdown)(void*, void*, const char*);
|
||||
pShutdown oShutdown;
|
||||
void __fastcall hkShutdown(void* thisptr, void* unk1, void* unk2, const char* reason) noexcept
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("shutdown (%x) HOOKED %s\n", thisptr, reason);
|
||||
#endif
|
||||
|
||||
if (*g_Options.discmsg_active) {
|
||||
#ifdef DEBUG
|
||||
printf("set new reason %s\n", g_Options.discmsg.value->mystring);
|
||||
#endif
|
||||
char customreason[256] = "#";
|
||||
strcat_s( customreason, MakeControlChars(g_Options.discmsg.value->mystring));
|
||||
|
||||
oShutdown(thisptr, nullptr, customreason);
|
||||
}
|
||||
else
|
||||
oShutdown(thisptr, nullptr, reason);
|
||||
}
|
||||
|
||||
inline void HookNetchannel()
|
||||
{
|
||||
DWORD ptrShutdown = *((DWORD*)iff.g_pEngineClient->GetNetChannelInfo()) + 36 * 4;
|
||||
DWORD addrShutdown = *(DWORD*)ptrShutdown;
|
||||
oShutdown = (pShutdown)DetourFunction(
|
||||
(PBYTE)(addrShutdown),
|
||||
(PBYTE)hkShutdown);
|
||||
#ifdef DEBUG
|
||||
printf("Detoured at %x\n", addrShutdown);
|
||||
#endif
|
||||
opt.netchannedlhooked = 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user