From d6f8b7d85067c8409d0de4dac9aa517d539e44d7 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 16 Sep 2010 17:43:17 +1200 Subject: [PATCH] fix z-order bug --- OpenRA.Game/Graphics/WorldRenderer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Graphics/WorldRenderer.cs b/OpenRA.Game/Graphics/WorldRenderer.cs index 2a35a12032..8392913ba2 100644 --- a/OpenRA.Game/Graphics/WorldRenderer.cs +++ b/OpenRA.Game/Graphics/WorldRenderer.cs @@ -43,7 +43,7 @@ namespace OpenRA.Graphics { var result = x.ZOffset.CompareTo(y.ZOffset); if (result == 0) - result = x.Pos.Y.CompareTo(y.Pos.Y); + result = (x.Pos.Y + .5f * x.Sprite.size.Y).CompareTo(y.Pos.Y + .5f * y.Sprite.size.Y); return result; }