Add fields to client_t structs, might be useful
This commit is contained in:
parent
3f726d3d0d
commit
eba1762fd0
@ -342,13 +342,14 @@ namespace Components
|
|||||||
Game::NET_DeferPacketToClient(from, msg);
|
Game::NET_DeferPacketToClient(from, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Network::SVExecuteClientMessageStub(Game::client_t* client, Game::msg_t* msg)
|
void Network::SV_ExecuteClientMessageStub(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,
|
if (client->reliableAcknowledge < 0 || client->reliableAcknowledge > 0xFF)
|
||||||
client->reliableSequence, client->reliableAcknowledge,
|
{
|
||||||
client->reliableSent, client->messageAcknowledge);
|
client->reliableAcknowledge = 0;
|
||||||
|
Game::NET_OutOfBandPrint(Game::NS_SERVER, client->netchan.remoteAddress, "disconnect");
|
||||||
OutputDebugStringA(message);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Utils::Hook::Call<void(Game::client_t*, Game::msg_t*)>(0x414D40)(client, msg);
|
Utils::Hook::Call<void(Game::client_t*, Game::msg_t*)>(0x414D40)(client, msg);
|
||||||
}
|
}
|
||||||
@ -392,7 +393,8 @@ namespace Components
|
|||||||
// Fix packets causing buffer overflow
|
// Fix packets causing buffer overflow
|
||||||
Utils::Hook(0x6267E3, Network::NET_DeferPacketToClientStub, HOOK_CALL).install()->quick();
|
Utils::Hook(0x6267E3, Network::NET_DeferPacketToClientStub, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
Utils::Hook(0x626996, Network::SVExecuteClientMessageStub, HOOK_CALL).install()->quick();
|
// Fix server freezer exploit
|
||||||
|
Utils::Hook(0x626996, Network::SV_ExecuteClientMessageStub, HOOK_CALL).install()->quick();
|
||||||
|
|
||||||
Network::Handle("resolveAddress", [](Address address, const std::string& /*data*/)
|
Network::Handle("resolveAddress", [](Address address, const std::string& /*data*/)
|
||||||
{
|
{
|
||||||
|
@ -90,7 +90,7 @@ namespace Components
|
|||||||
static void PacketErrorCheck();
|
static void PacketErrorCheck();
|
||||||
static void NET_DeferPacketToClientStub(Game::netadr_t* from, Game::msg_t* msg);
|
static void NET_DeferPacketToClientStub(Game::netadr_t* from, Game::msg_t* msg);
|
||||||
|
|
||||||
static void SVExecuteClientMessageStub(Game::client_t* client, Game::msg_t* msg);
|
static void SV_ExecuteClientMessageStub(Game::client_t* client, Game::msg_t* msg);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -495,10 +495,10 @@ namespace Game
|
|||||||
typedef bool(__cdecl * NET_StringToAdr_t)(const char *s, netadr_t *a);
|
typedef bool(__cdecl * NET_StringToAdr_t)(const char *s, netadr_t *a);
|
||||||
extern NET_StringToAdr_t NET_StringToAdr;
|
extern NET_StringToAdr_t NET_StringToAdr;
|
||||||
|
|
||||||
typedef void(__cdecl* NET_OutOfBandPrint_t)(netsrc_t sock, netadr_t adr, const char *data);
|
typedef void(__cdecl * NET_OutOfBandPrint_t)(netsrc_t sock, netadr_t adr, const char *data);
|
||||||
extern NET_OutOfBandPrint_t NET_OutOfBandPrint;
|
extern NET_OutOfBandPrint_t NET_OutOfBandPrint;
|
||||||
|
|
||||||
typedef void(__cdecl* NET_OutOfBandData_t)(netsrc_t sock, netadr_t adr, const char *format, int len);
|
typedef void(__cdecl * NET_OutOfBandData_t)(netsrc_t sock, netadr_t adr, const char *format, int len);
|
||||||
extern NET_OutOfBandData_t NET_OutOfBandData;
|
extern NET_OutOfBandData_t NET_OutOfBandData;
|
||||||
|
|
||||||
typedef void(__cdecl * Live_MPAcceptInvite_t)(_XSESSION_INFO *hostInfo, const int controllerIndex, bool fromGameInvite);
|
typedef void(__cdecl * Live_MPAcceptInvite_t)(_XSESSION_INFO *hostInfo, const int controllerIndex, bool fromGameInvite);
|
||||||
|
@ -4665,7 +4665,9 @@ namespace Game
|
|||||||
int messageAcknowledge; // 134760
|
int messageAcknowledge; // 134760
|
||||||
char __pad4[1080]; // 134764
|
char __pad4[1080]; // 134764
|
||||||
char name[16]; // 135844
|
char name[16]; // 135844
|
||||||
char __pad5[12]; // 135860
|
char __pad5[4]; // 135860
|
||||||
|
int lastPacketTime; // 135864
|
||||||
|
int lastConnectTime; // 135868
|
||||||
int snapNum; // 135872
|
int snapNum; // 135872
|
||||||
int __pad6; // 135876
|
int __pad6; // 135876
|
||||||
short ping; // 135880
|
short ping; // 135880
|
||||||
|
Loading…
Reference in New Issue
Block a user