Network/ENet: Separate Connect event into OutgoingConnect and IncomingConnect

This commit is contained in:
Lynix
2017-05-19 16:31:29 +02:00
parent 1d44adf23a
commit 3ca179b954
4 changed files with 26 additions and 15 deletions

View File

@@ -501,7 +501,7 @@ namespace Nz
if (commandNumber != ENetProtocolCommand_VerifyConnect)
return false;
m_host->NotifyConnect(this, event);
m_host->NotifyConnect(this, event, true);
break;
case ENetPeerState::Disconnecting:
@@ -864,7 +864,7 @@ namespace Nz
NetToHost(command->verifyConnect.packetThrottleInterval) != m_packetThrottleInterval ||
NetToHost(command->verifyConnect.packetThrottleAcceleration) != m_packetThrottleAcceleration ||
NetToHost(command->verifyConnect.packetThrottleDeceleration) != m_packetThrottleDeceleration ||
command->verifyConnect.connectID != m_connectID)
command->verifyConnect.connectID != m_connectID)
{
m_eventData = 0;
@@ -891,7 +891,7 @@ namespace Nz
m_incomingBandwidth = NetToHost(command->verifyConnect.incomingBandwidth);
m_outgoingBandwidth = NetToHost(command->verifyConnect.outgoingBandwidth);
m_host->NotifyConnect(this, event);
m_host->NotifyConnect(this, event, false);
return true;
}