[Network] Ignore WSAENETRESET error
This commit is contained in:
parent
441fa6938f
commit
bb6b1b0764
@ -315,6 +315,25 @@ namespace Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__declspec(naked) void Network::PacketErrorCheck()
|
||||||
|
{
|
||||||
|
__asm
|
||||||
|
{
|
||||||
|
cmp eax, 2746h
|
||||||
|
jz returnIgnore
|
||||||
|
|
||||||
|
cmp eax, WSAENETRESET
|
||||||
|
jz returnIgnore
|
||||||
|
|
||||||
|
push 465325h
|
||||||
|
retn
|
||||||
|
|
||||||
|
returnIgnore:
|
||||||
|
push 4654C6h
|
||||||
|
retn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Network::Network()
|
Network::Network()
|
||||||
{
|
{
|
||||||
AssertSize(Game::netadr_t, 20);
|
AssertSize(Game::netadr_t, 20);
|
||||||
@ -338,6 +357,9 @@ namespace Components
|
|||||||
// Install interception handler
|
// Install interception handler
|
||||||
Utils::Hook(0x5AA709, Network::PacketInterceptionHandler, HOOK_CALL).install()->quick();
|
Utils::Hook(0x5AA709, Network::PacketInterceptionHandler, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
|
// Prevent recvfrom error spam
|
||||||
|
Utils::Hook(0x46531A, Network::PacketErrorCheck, HOOK_JUMP).install()->quick();
|
||||||
|
|
||||||
// Install packet deploy hook
|
// Install packet deploy hook
|
||||||
Utils::Hook::RedirectJump(0x5AA713, Network::DeployPacketStub);
|
Utils::Hook::RedirectJump(0x5AA713, Network::DeployPacketStub);
|
||||||
|
|
||||||
|
@ -90,5 +90,7 @@ namespace Components
|
|||||||
|
|
||||||
static void NetworkStart();
|
static void NetworkStart();
|
||||||
static void NetworkStartStub();
|
static void NetworkStartStub();
|
||||||
|
|
||||||
|
static void PacketErrorCheck();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user