A bunch of fixes to syncing clients who join mid-round:
- syncing items spawned/removed mid-round - syncing characters spawned mid-round (through the console or by respawning) - making sure that item IDs of the spawned characters match - syncing wall damage
This commit is contained in:
@@ -435,6 +435,11 @@ namespace Barotrauma
|
||||
|
||||
foreach (AITarget target in AITarget.List)
|
||||
{
|
||||
if (Level.Loaded != null && target.WorldPosition.Y > Level.Loaded.Size.Y)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
float valueModifier = 0.0f;
|
||||
float dist = 0.0f;
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@ namespace Barotrauma
|
||||
{
|
||||
public static List<Character> CharacterList = new List<Character>();
|
||||
|
||||
public static Queue<CharacterInfo> NewCharacterQueue = new Queue<CharacterInfo>();
|
||||
|
||||
public static bool DisableControls;
|
||||
|
||||
//the Character that the player is currently controlling
|
||||
@@ -37,6 +35,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
public bool SpawnedMidRound;
|
||||
|
||||
private bool enabled;
|
||||
|
||||
public bool Enabled
|
||||
@@ -161,6 +161,12 @@ namespace Barotrauma
|
||||
get { return inventory; }
|
||||
}
|
||||
|
||||
public WayPoint SpawnPoint
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
private Color speechBubbleColor;
|
||||
private float speechBubbleTimer;
|
||||
|
||||
@@ -783,7 +789,7 @@ namespace Barotrauma
|
||||
|
||||
foreach (Character c in CharacterList)
|
||||
{
|
||||
if (c == this) continue;
|
||||
if (c == this || !c.enabled) continue;
|
||||
|
||||
if (Vector2.Distance(SimPosition, c.SimPosition) > maxDist) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user