diff --git a/bot/net/netgame.cpp b/bot/net/netgame.cpp index eb95471..f082f05 100644 --- a/bot/net/netgame.cpp +++ b/bot/net/netgame.cpp @@ -1,5 +1,6 @@ #include "../main.h" +#include "../../raknet/SocketDataEncryptor.h" char unnamed_2[63]; char unnamed_5[1000][24]; @@ -52,6 +53,8 @@ void CNetGame::Init(PCHAR szHostOrIp, int iPort, m_pRakClient = RakNetworkFactory::GetRakClientInterface(); + SocketDataEncryptor::SetKey(iPort); + RegisterRPCs(m_pRakClient); RegisterScriptRPCs(m_pRakClient); diff --git a/saco/net/netgame.cpp b/saco/net/netgame.cpp index a8693f3..38a3b30 100644 --- a/saco/net/netgame.cpp +++ b/saco/net/netgame.cpp @@ -1,5 +1,6 @@ #include "../main.h" +#include "../../raknet/SocketDataEncryptor.h" extern CGame *pGame; extern CChatWindow *pChatWindow; @@ -48,6 +49,8 @@ CNetGame::CNetGame(PCHAR szHostOrIp, int iPort, InitPools(); + SocketDataEncryptor::SetKey(iPort); + RegisterRPCs(m_pRakClient); RegisterScriptRPCs(m_pRakClient); // Register server-side scripting RPCs. diff --git a/server/netgame.cpp b/server/netgame.cpp index 774071e..4bac454 100644 --- a/server/netgame.cpp +++ b/server/netgame.cpp @@ -1,5 +1,6 @@ #include "main.h" +#include "../raknet/SocketDataEncryptor.h" int CanFileBeOpenedForReading(char * filename); @@ -65,7 +66,7 @@ CNetGame::CNetGame() // Setup RakNet m_pRak = RakNetworkFactory::GetRakServerInterface(); - + SocketDataEncryptor::SetKey(dwPort);