(face37755) Fixed clients timing out when trying to connect to a server that has banned someone. Closes #1568

This commit is contained in:
Joonas Rikkonen
2019-06-12 16:43:34 +03:00
parent 54fe039c8a
commit eaf4f6afb8
29 changed files with 171 additions and 327 deletions
@@ -20,8 +20,8 @@ namespace Barotrauma
/// </summary>
const float CharacterWaitOnSwitch = 10.0f;
private readonly List<CharacterInfo> characterInfos = new List<CharacterInfo>();
private readonly List<Character> characters = new List<Character>();
private List<CharacterInfo> characterInfos = new List<CharacterInfo>();
private List<Character> characters = new List<Character>();
private Point screenResolution;
@@ -256,18 +256,6 @@ namespace Barotrauma
{
if (c.Info == null || c.Inventory == null) { continue; }
var inventoryElement = new XElement("inventory");
// Recharge headset batteries
var headset = c.Inventory.FindItemByIdentifier("headset");
if (headset != null)
{
var battery = headset.OwnInventory.FindItemByTag("loadable");
if (battery != null)
{
battery.Condition = battery.MaxCondition;
}
}
c.SaveInventory(c.Inventory, inventoryElement);
c.Info.InventoryData = inventoryElement;
c.Inventory?.DeleteAllItems();