mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r14808) -Fix (r1): coal mine subsidence could wrap around map edges
This commit is contained in:
parent
b00e510140
commit
5ba7c672da
@ -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