mirror of
https://github.com/HikikoMarmy/Champions-Reborn-Server.git
synced 2026-04-11 03:19:49 -03:00
Correct IP reporting to clients.
Force port 3000 (game expects it)
This commit is contained in:
@@ -190,7 +190,7 @@ bool GameSessionManager::RequestOpen( sptr_user user )
|
||||
session->m_state = GameSession::GameState::Open;
|
||||
|
||||
// Tell the host its own address.
|
||||
NotifyGameDiscovered msg(user->m_discoveryAddr, user->m_discoveryPort);
|
||||
NotifyGameDiscovered msg( user->m_discoveryAddr, 3000 );// user->m_discoveryPort);
|
||||
user->sock->send( msg );
|
||||
|
||||
Log::Info( "Game Session [%d] Discoverable on %s", gameId, user->m_discoveryAddr.c_str() );
|
||||
@@ -272,19 +272,13 @@ bool GameSessionManager::RequestJoin( sptr_user join_user )
|
||||
join_user->m_isHost = false;
|
||||
|
||||
// First, notify the host that a client is trying to connect.
|
||||
NotifyClientRequestConnect msgNotifyReqConnect(join_user->m_discoveryAddr, join_user->m_discoveryPort);
|
||||
NotifyClientRequestConnect msgNotifyReqConnect( join_user->m_discoveryAddr, 3000 );// join_user->m_discoveryPort);
|
||||
host_user->sock->send( msgNotifyReqConnect );
|
||||
|
||||
// Then, tell the joiner where to send packets.
|
||||
NotifyClientDiscovered msgClientDiscovered(host_user->m_discoveryAddr, host_user->m_discoveryPort);
|
||||
NotifyClientDiscovered msgClientDiscovered( join_user->m_discoveryAddr, 3000 );// host_user->m_discoveryPort);
|
||||
join_user->sock->send( msgClientDiscovered );
|
||||
|
||||
Log::Info( "Send User Address to host [%S] from %s:%d", join_user->m_sessionId.c_str(), join_user->m_discoveryAddr.c_str(), join_user->m_discoveryPort );
|
||||
|
||||
|
||||
|
||||
Log::Info( "Send Host Address to user [%S] from %s:%d", join_user->m_sessionId.c_str(), host_user->m_discoveryAddr.c_str(), join_user->m_discoveryPort );
|
||||
|
||||
Log::Info( "User [%S] Joining game session... [%d]", join_user->m_sessionId.c_str(), gameId );
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user