(svn r26900) -Fix-ish: dirty the appropriate area around map edges when terraforming there to prevent any artefacts from occuring (ic111)
This commit is contained in:
@@ -2139,6 +2139,20 @@ void MarkTileDirtyByTile(TileIndex tile)
|
||||
);
|
||||
}
|
||||
|
||||
void MarkTileDirtyByTileOutsideMap(int x, int y)
|
||||
{
|
||||
Point pt = RemapCoords(x * TILE_SIZE, y * TILE_SIZE, GetTilePixelZOutsideMap(x, y));
|
||||
/* Since tiles painted outside the map don't contain buildings, trees, etc.,
|
||||
* this reduced area for repainting should suffice. If not, adjust the offsets
|
||||
* used below. */
|
||||
MarkAllViewportsDirty(
|
||||
pt.x - TILE_SIZE + 1,
|
||||
pt.y,
|
||||
pt.x + TILE_SIZE - 1,
|
||||
pt.y + TILE_SIZE + TILE_HEIGHT - 1
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the selected tiles as dirty.
|
||||
*
|
||||
|
Reference in New Issue
Block a user