Change: Store water tile flooding state in the map.

This allows water tiles which cannot flood any further to not even try to flood.

On a large map with lots of water tiles this can noticeably reduce game loop processing time.

Mostly ported from JGRPP.
This commit is contained in:
Peter Nelson
2024-10-19 19:09:53 +01:00
committed by Peter Nelson
parent 4cd46e54aa
commit 8f9836793f
11 changed files with 67 additions and 4 deletions
+2
View File
@@ -537,6 +537,7 @@ void DoClearSquare(TileIndex tile)
MarkTileDirtyByTile(tile);
if (remove) RemoveDockingTile(tile);
ClearNeighbourNonFloodingStates(tile);
InvalidateWaterRegion(tile);
}
@@ -693,6 +694,7 @@ CommandCost CmdLandscapeClear(DoCommandFlag flags, TileIndex tile)
}
}
DoClearSquare(tile);
ClearNeighbourNonFloodingStates(tile);
}
}
return cost;