diff --git a/OpenRA.Mods.Common/Traits/World/EditorResourceLayer.cs b/OpenRA.Mods.Common/Traits/World/EditorResourceLayer.cs index 56fc6dd836..9a1264fc8a 100644 --- a/OpenRA.Mods.Common/Traits/World/EditorResourceLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/EditorResourceLayer.cs @@ -163,7 +163,7 @@ namespace OpenRA.Mods.Common.Traits NetWorth += t.Density * type.Info.ValuePerUnit; var sprites = type.Variants[t.Variant]; - var frame = int2.Lerp(0, sprites.Length - 1, t.Density - 1, type.Info.MaxDensity); + var frame = int2.Lerp(0, sprites.Length - 1, t.Density, type.Info.MaxDensity); t.Sprite = sprites[frame]; return t; diff --git a/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs index 570deb906d..026c649eac 100644 --- a/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs @@ -145,7 +145,7 @@ namespace OpenRA.Mods.Common.Traits if (t.Density > 0) { var sprites = t.Type.Variants[t.Variant]; - var frame = int2.Lerp(0, sprites.Length - 1, t.Density - 1, t.Type.Info.MaxDensity); + var frame = int2.Lerp(0, sprites.Length - 1, t.Density, t.Type.Info.MaxDensity); t.Sprite = sprites[frame]; } else