Network/ENet: Add peer-side lag simulation
This commit is contained in:
@@ -12,7 +12,8 @@ namespace Nz
|
||||
m_host(host),
|
||||
m_incomingSessionID(0xFF),
|
||||
m_outgoingSessionID(0xFF),
|
||||
m_incomingPeerID(peerId)
|
||||
m_incomingPeerID(peerId),
|
||||
m_isSimulationEnabled(false)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
@@ -62,6 +63,11 @@ namespace Nz
|
||||
return m_state == ENetPeerState::Connected || m_state == ENetPeerState::DisconnectLater;
|
||||
}
|
||||
|
||||
inline bool ENetPeer::IsSimulationEnabled() const
|
||||
{
|
||||
return m_isSimulationEnabled;
|
||||
}
|
||||
|
||||
inline void ENetPeer::ChangeState(ENetPeerState state)
|
||||
{
|
||||
if (state == ENetPeerState::Connected || state == ENetPeerState::DisconnectLater)
|
||||
|
||||
Reference in New Issue
Block a user