Merge pull request #5840 from Mailaender/map-download-isometry-nre
Fixed a NullReferenceException in auto map download.
This commit is contained in:
@@ -132,7 +132,8 @@ namespace OpenRA.Widgets
|
||||
public int2 ConvertToPreview(CPos cell)
|
||||
{
|
||||
var preview = Preview();
|
||||
var point = Map.CellToMap(preview.Map.TileShape, cell);
|
||||
var tileShape = Game.modData.Manifest.TileShape;
|
||||
var point = Map.CellToMap(tileShape, cell);
|
||||
var dx = (int)(previewScale * (point.X - preview.Bounds.Left));
|
||||
var dy = (int)(previewScale * (point.Y - preview.Bounds.Top));
|
||||
return new int2(mapRect.X + dx, mapRect.Y + dy);
|
||||
|
||||
Reference in New Issue
Block a user