All items and structures have to define a sourcerect for the sprite because otherwise the dedicated server won't know the size of the entity. Closes #321

This commit is contained in:
Joonas Rikkonen
2018-03-06 13:55:30 +02:00
parent 0ab4521a7a
commit 8e8b8464af
16 changed files with 36 additions and 36 deletions
@@ -99,6 +99,10 @@ namespace Barotrauma
{
case "sprite":
sp.sprite = new Sprite(subElement);
if (subElement.Attribute("sourcerect") == null)
{
DebugConsole.ThrowError("Warning - sprite sourcerect not configured for structure \"" + sp.name + "\"!");
}
if (subElement.GetAttributeBool("fliphorizontal", false))
sp.sprite.effects = SpriteEffects.FlipHorizontally;