mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r14808) -Fix (r1): coal mine subsidence could wrap around map edges
This commit is contained in:
parent
254e19da91
commit
16fb54da5e
@ -983,11 +983,11 @@ static void Disaster_CoalMine_Init()
|
||||
{
|
||||
TileIndex tile = i->xy;
|
||||
TileIndexDiff step = TileOffsByDiagDir((DiagDirection)GB(Random(), 0, 2));
|
||||
uint n;
|
||||
|
||||
for (n = 0; n < 30; n++) {
|
||||
for (uint n = 0; n < 30; n++) {
|
||||
DisasterClearSquare(tile);
|
||||
tile = TILE_MASK(tile + step);
|
||||
tile += step;
|
||||
if (!IsValidTile(tile)) break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user