You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-15 22:56:30 +09:00
Bug in reliability fixed
This commit is contained in:
@@ -43,7 +43,6 @@ namespace Lidgren.Network
|
||||
throw new NetException("Key too short!");
|
||||
|
||||
m_numRounds = rounds;
|
||||
|
||||
m_sum0 = new uint[m_numRounds];
|
||||
m_sum1 = new uint[m_numRounds];
|
||||
uint[] tmp = new uint[8];
|
||||
@@ -72,6 +71,14 @@ namespace Lidgren.Network
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// String to hash for key
|
||||
/// </summary>
|
||||
public NetXtea(string key)
|
||||
: this(NetSha.Hash(Encoding.ASCII.GetBytes(key)), 32)
|
||||
{
|
||||
}
|
||||
|
||||
public void EncryptBlock(
|
||||
byte[] inBytes,
|
||||
int inOff,
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Lidgren.Network
|
||||
throw new NetException("Trying to encode NetMessageType " + m_type + " to unconnected endpoint!");
|
||||
|
||||
ushort seqNr;
|
||||
if (m_type >= NetMessageType.UserReliableUnordered)
|
||||
if (m_type < NetMessageType.UserReliableUnordered)
|
||||
seqNr = conn.GetSendSequenceNumber(m_type); // "disposable" sequence number
|
||||
else
|
||||
seqNr = conn.StoreReliableMessage(now, this);
|
||||
|
||||
Reference in New Issue
Block a user