Fix map borders when switching freeform edges

When disabling freeform edges after they were enabled, the tiles
at the northern borders of the map were turned from void to water
by simply setting their type to MP_WATER, which is wrong, because
they were left as owned by player 0, since their owner information
was not updated. Use MakeSea instead, which gets it right.

(cherry picked from commit 39408d6cc4080760f5a58d60cbed9f2ea584496f)
This commit is contained in:
cirdan
2013-05-01 09:33:24 +02:00
committed by Jonathan G Rennison
parent c5e30b8f04
commit 25bd3ed6f4

View File

@@ -1266,11 +1266,11 @@ static bool CheckFreeformEdges(int32 p1)
/* Make tiles at the border water again. */
for (uint i = 0; i < MapMaxX(); i++) {
SetTileHeight(TileXY(i, 0), 0);
SetTileType(TileXY(i, 0), MP_WATER);
MakeSea(TileXY(i, 0));
}
for (uint i = 0; i < MapMaxY(); i++) {
SetTileHeight(TileXY(0, i), 0);
SetTileType(TileXY(0, i), MP_WATER);
MakeSea(TileXY(0, i));
}
}
MarkWholeScreenDirty();