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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user