From 3e1070db78dd9de65edbbfb2fe3b67f6d29b1dfe Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Thu, 3 Sep 2026 05:20:36 +0700 Subject: [PATCH] [saco] Match three `CNetGame` packet handlers; full, bad password and no response --- saco/net/netgame.cpp | 27 +++++++++++++++++++++++++++ saco/net/netgame.h | 4 ++++ 2 files changed, 31 insertions(+) diff --git a/saco/net/netgame.cpp b/saco/net/netgame.cpp index 7b00ca0..3cf0d06 100644 --- a/saco/net/netgame.cpp +++ b/saco/net/netgame.cpp @@ -144,3 +144,30 @@ void CNetGame::ResetMapIcons() } //---------------------------------------------------- + +//---------------------------------------------------- + +// MATCH +void CNetGame::Packet_NoFreeIncomingConnections(Packet *p) +{ + pChatWindow->AddDebugMessage("The server is full. Retrying..."); + m_iGameState = GAMESTATE_WAIT_CONNECT; +} + +//---------------------------------------------------- + +// MATCH +void CNetGame::Packet_InvalidPassword(Packet *p) +{ + pChatWindow->AddDebugMessage("Wrong server password."); + GetRakClient()->Disconnect(0,0); +} + +//---------------------------------------------------- + +// MATCH +void CNetGame::Packet_ConnectionAttemptFailed(Packet *p) +{ + pChatWindow->AddDebugMessage("The server didn't respond. Retrying.."); + m_iGameState = GAMESTATE_WAIT_CONNECT; +} diff --git a/saco/net/netgame.h b/saco/net/netgame.h index 6acdbad..22ebe10 100644 --- a/saco/net/netgame.h +++ b/saco/net/netgame.h @@ -106,6 +106,10 @@ public: void DisableMapIcon(BYTE byteIndex); // .text:10008FB0 CMenuPool * GetMenuPool() { return m_pPools->pMenuPool; }; // .text:100084F0 + void Packet_NoFreeIncomingConnections(Packet *p); // .text:10008DB0 + void Packet_InvalidPassword(Packet *p); // .text:10008E20 + void Packet_ConnectionAttemptFailed(Packet *p); // .text:10008E60 + int ToggleNameTagStatus(); // .text:10008E90 void sub_1000A540(); // .text:1000A540 };