Changed lobby & chatMsg IDs to from uint to ushort, added a utility class that handles the wrap around of IDs

This commit is contained in:
Regalis
2017-02-05 22:55:19 +02:00
parent 9bda79036a
commit 4b8d1054b1
7 changed files with 94 additions and 42 deletions
+2 -3
View File
@@ -52,9 +52,8 @@ namespace Barotrauma
public bool IsServer;
public string ServerName;
const float NetworkUpdateInterval = 1.0f;
private UInt32 lastUpdateID;
public UInt32 LastUpdateID
private UInt16 lastUpdateID;
public UInt16 LastUpdateID
{
get { if (GameMain.Server != null && lastUpdateID < 1) lastUpdateID++; return lastUpdateID; }
set { if (GameMain.Server != null) return; lastUpdateID = value; }