Reapply "OBT1.1.0 Merge branch 'dev_pte' into dev"
This reverts commit 046483b9da.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace Barotrauma.Networking
|
||||
{
|
||||
@@ -183,10 +184,19 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
protected const int MaxSubNameLengthInErrorMessages = 16;
|
||||
|
||||
private int lastClientListUpdateID;
|
||||
public UInt16 LastClientListUpdateID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
get => (UInt16)Interlocked.CompareExchange(ref lastClientListUpdateID, 0, 0);
|
||||
set => Interlocked.Exchange(ref lastClientListUpdateID, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Thread-safe increment of LastClientListUpdateID
|
||||
/// </summary>
|
||||
public void IncrementLastClientListUpdateID()
|
||||
{
|
||||
Interlocked.Increment(ref lastClientListUpdateID);
|
||||
}
|
||||
|
||||
public abstract bool IsServer { get; }
|
||||
|
||||
Reference in New Issue
Block a user