Initial Hooking of functions
This commit is contained in:
parent
e873b48571
commit
3f726d3d0d
@ -342,6 +342,17 @@ namespace Components
|
||||
Game::NET_DeferPacketToClient(from, msg);
|
||||
}
|
||||
|
||||
void Network::SVExecuteClientMessageStub(Game::client_t* client, Game::msg_t* msg)
|
||||
{
|
||||
const char* message = Utils::String::VA("ServerID: %d, Sequence: %d, Acknowledge: %d, Sent: %d, Message: %d\n", client->serverID,
|
||||
client->reliableSequence, client->reliableAcknowledge,
|
||||
client->reliableSent, client->messageAcknowledge);
|
||||
|
||||
OutputDebugStringA(message);
|
||||
|
||||
Utils::Hook::Call<void(Game::client_t*, Game::msg_t*)>(0x414D40)(client, msg);
|
||||
}
|
||||
|
||||
Network::Network()
|
||||
{
|
||||
AssertSize(Game::netadr_t, 20);
|
||||
@ -381,6 +392,8 @@ namespace Components
|
||||
// Fix packets causing buffer overflow
|
||||
Utils::Hook(0x6267E3, Network::NET_DeferPacketToClientStub, HOOK_CALL).install()->quick();
|
||||
|
||||
Utils::Hook(0x626996, Network::SVExecuteClientMessageStub, HOOK_CALL).install()->quick();
|
||||
|
||||
Network::Handle("resolveAddress", [](Address address, const std::string& /*data*/)
|
||||
{
|
||||
Network::SendRaw(address, address.getString());
|
||||
|
@ -89,6 +89,8 @@ namespace Components
|
||||
|
||||
static void PacketErrorCheck();
|
||||
static void NET_DeferPacketToClientStub(Game::netadr_t* from, Game::msg_t* msg);
|
||||
|
||||
static void SVExecuteClientMessageStub(Game::client_t* client, Game::msg_t* msg);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -4662,7 +4662,8 @@ namespace Game
|
||||
int reliableSequence; // 134748
|
||||
int reliableAcknowledge; // 134752
|
||||
int reliableSent; // 134756
|
||||
char __pad4[1084]; // 134760
|
||||
int messageAcknowledge; // 134760
|
||||
char __pad4[1080]; // 134764
|
||||
char name[16]; // 135844
|
||||
char __pad5[12]; // 135860
|
||||
int snapNum; // 135872
|
||||
@ -4670,7 +4671,8 @@ namespace Game
|
||||
short ping; // 135880
|
||||
char __pad7[133158]; // 135882
|
||||
int isBot; // 269040
|
||||
char __pad8[9228]; // 269044
|
||||
int serverID; // 269044
|
||||
char __pad8[9224]; // 269048
|
||||
unsigned __int64 steamID; // 278272
|
||||
char __pad9[403592]; // 278280
|
||||
} client_t;
|
||||
|
Loading…
Reference in New Issue
Block a user