v0.2.2: updated Lidgren, railgun shells can be bought, autorestart server, netstats, tutorial moloch spawning in a wall fix, misc error checks

This commit is contained in:
Regalis
2015-10-18 22:44:30 +03:00
parent aa3882a815
commit 0e5e86e363
85 changed files with 2763 additions and 1866 deletions
+8 -1
View File
@@ -24,6 +24,11 @@ namespace Lidgren.Network
internal int m_currentMTU;
/// <summary>
/// Gets the current MTU in bytes. If PeerConfiguration.AutoExpandMTU is false, this will be PeerConfiguration.MaximumTransmissionUnit.
/// </summary>
public int CurrentMTU { get { return m_currentMTU; } }
internal void InitExpandMTU(double now)
{
m_lastSentMTUAttemptTime = now + m_peerConfiguration.m_expandMTUFrequency + 1.5f + m_averageRoundtripTime; // wait a tiny bit before starting to expand mtu
@@ -128,6 +133,7 @@ namespace Lidgren.Network
m_lastSentMTUAttemptTime = now;
m_statistics.PacketSent(len, 1);
m_peer.Recycle(om);
}
private void FinalizeMTU(int size)
@@ -149,8 +155,9 @@ namespace Lidgren.Network
int len = om.Encode(m_peer.m_sendBuffer, 0, 0);
bool connectionReset;
m_peer.SendPacket(len, m_remoteEndPoint, 1, out connectionReset);
m_peer.Recycle(om);
// m_peer.LogDebug("Received MTU expand request for " + size + " bytes");
//m_peer.LogDebug("Received MTU expand request for " + size + " bytes");
m_statistics.PacketSent(len, 1);
}