From 0dee8208a8f0e0eefc5b83a1a6578037955d7b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 7 Jun 2014 11:26:14 +0200 Subject: [PATCH] never spawn with density 0 because that is not rendered --- OpenRA.Game/Traits/World/ResourceLayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Traits/World/ResourceLayer.cs b/OpenRA.Game/Traits/World/ResourceLayer.cs index d5db22f52d..1d024de7f8 100644 --- a/OpenRA.Game/Traits/World/ResourceLayer.cs +++ b/OpenRA.Game/Traits/World/ResourceLayer.cs @@ -94,7 +94,7 @@ namespace OpenRA.Traits // Adjacent includes the current cell, so is always >= 1 var adjacent = GetAdjacentCellsWith(type, x, y); var density = int2.Lerp(0, type.Info.MaxDensity, adjacent, 9); - content[x, y].Density = density; + content[x, y].Density = Math.Max(density, 1); render[x, y] = content[x, y]; UpdateRenderedSprite(new CPos(x, y));