Release v0.15.12.0

This commit is contained in:
Joonas Rikkonen
2021-10-27 18:50:57 +03:00
parent bf95e82d80
commit 234fb6bc06
450 changed files with 26042 additions and 10457 deletions
@@ -26,6 +26,9 @@ namespace Barotrauma.Networking
//any respawn items left in the shuttle are removed when the shuttle despawns
private readonly List<Item> respawnItems = new List<Item>();
//characters who spawned during the last respawn
private readonly List<Character> respawnedCharacters = new List<Character>();
public bool UsingShuttle
{
get { return RespawnShuttle != null; }
@@ -277,11 +280,17 @@ namespace Barotrauma.Networking
hull.BallastFlora?.Kill();
}
Dictionary<Character, Vector2> characterPositions = new Dictionary<Character, Vector2>();
foreach (Character c in Character.CharacterList)
{
if (c.Submarine != RespawnShuttle) { continue; }
if (!respawnedCharacters.Contains(c))
{
characterPositions.Add(c, c.WorldPosition);
continue;
}
#if CLIENT
if (Character.Controlled == c) Character.Controlled = null;
if (Character.Controlled == c) { Character.Controlled = null; }
#endif
c.Kill(CauseOfDeathType.Unknown, null, true);
c.Enabled = false;
@@ -298,6 +307,11 @@ namespace Barotrauma.Networking
RespawnShuttle.SetPosition(new Vector2(Level.Loaded.StartPosition.X, Level.Loaded.Size.Y + RespawnShuttle.Borders.Height));
RespawnShuttle.Velocity = Vector2.Zero;
foreach (var characterPosition in characterPositions)
{
characterPosition.Key.TeleportTo(characterPosition.Value);
}
}
partial void RespawnCharactersProjSpecific(Vector2? shuttlePos);