Fixed items attached mid-round by other clients or the host being impossible to interact with and occasionally being attached to an incorrect position. Closes #296

This commit is contained in:
Joonas Rikkonen
2018-02-28 14:01:38 +02:00
parent 2585cc9873
commit 74ef5c6ea6
5 changed files with 40 additions and 18 deletions
@@ -575,7 +575,15 @@ namespace Barotrauma.Items.Components
}
}
/// <summary>
/// Called when all items have been loaded. Use to initialize connections between items.
/// </summary>
public virtual void OnMapLoaded() { }
/// <summary>
/// Called when all the components of the item have been loaded. Use to initialize connections between components and such.
/// </summary>
public virtual void OnItemLoaded() { }
public static ItemComponent Load(XElement element, Item item, string file, bool errorMessages = true)
{