From b4c767ce48841b46b6a2199ae2c8209a9be45124 Mon Sep 17 00:00:00 2001 From: Gustas <37534529+PunkPun@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:01:54 +0300 Subject: [PATCH] Remove unnecessary branching from ToCPos --- OpenRA.Game/MPos.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenRA.Game/MPos.cs b/OpenRA.Game/MPos.cs index aa11754b72..f004bb455a 100644 --- a/OpenRA.Game/MPos.cs +++ b/OpenRA.Game/MPos.cs @@ -56,8 +56,7 @@ namespace OpenRA // (b) Therefore: // - au + 2bv adds (a + b) to (x, y) // - a correction factor is added if v is odd - var offset = (V & 1) == 1 ? 1 : 0; - var y = (V - offset) / 2 - U; + var y = (V - (V & 1)) / 2 - U; var x = V - y; return new CPos(x, y); }