Replace WPos.ToCPos -> Map.CellContaining.

This commit is contained in:
Paul Chote
2013-09-17 22:57:30 +12:00
parent 4bc09692e0
commit 9487f49cd5
43 changed files with 81 additions and 83 deletions

View File

@@ -471,6 +471,11 @@ namespace OpenRA
return new WPos(1024 * c.X + 512, 1024 * c.Y + 512, 0);
}
public CPos CellContaining(WPos pos)
{
return new CPos(pos.X / 1024, pos.Y / 1024);
}
public void Resize(int width, int height) // editor magic.
{
var oldMapTiles = MapTiles.Value;