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:
@@ -308,6 +308,10 @@ namespace Barotrauma
|
||||
canSpriteFlipX = subElement.GetAttributeBool("canflipx", true);
|
||||
|
||||
sprite = new Sprite(subElement, spriteFolder);
|
||||
if (subElement.Attribute("sourcerect") == null)
|
||||
{
|
||||
DebugConsole.ThrowError("Warning - sprite sourcerect not configured for item \"" + Name + "\"!");
|
||||
}
|
||||
size = sprite.size;
|
||||
break;
|
||||
#if CLIENT
|
||||
|
||||
Reference in New Issue
Block a user