Draw editor terrain/resource preview as part of the world.

This commit is contained in:
Paul Chote
2020-01-12 12:28:06 +00:00
committed by abcdefg30
parent e74033bded
commit cc05621c10
8 changed files with 129 additions and 73 deletions

View File

@@ -824,6 +824,14 @@ namespace OpenRA
return new WDist(delta.Z);
}
public WVec Offset(CVec delta, int dz)
{
if (Grid.Type == MapGridType.Rectangular)
return new WVec(1024 * delta.X, 1024 * delta.Y, 0);
return new WVec(724 * (delta.X - delta.Y), 724 * (delta.X + delta.Y), 724 * dz);
}
/// <summary>
/// The size of the map Height step in world units
/// </summary>