Worn items use the spritecolor set in the sub editor. Closes #574

This commit is contained in:
Joonas Rikkonen
2018-08-06 11:01:13 +03:00
parent 6a415afaa1
commit 362c97ce05

View File

@@ -194,10 +194,11 @@ namespace Barotrauma
}
}
Color wearableColor = wearable.WearableComponent.Item.GetSpriteColor();
wearable.Sprite.Draw(spriteBatch,
new Vector2(body.DrawPosition.X, -body.DrawPosition.Y),
color, origin,
-body.DrawRotation,
new Color((color.R * wearableColor.R) / 255.0f, (color.G * wearableColor.G) / 255.0f, (color.B * wearableColor.B) / 255.0f, (color.A * wearableColor.A) / 255.0f),
origin, -body.DrawRotation,
Scale, spriteEffect, depth);
}