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:
committed by
Peter Nelson
parent
4cd46e54aa
commit
8f9836793f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user