Fix missing water region invalidations for rail with water and water objects
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "newgrf_debug.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "station_func.h"
|
||||
#include "pathfinder/water_regions.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/object_land.h"
|
||||
@@ -169,6 +170,7 @@ void BuildObject(ObjectType type, TileIndex tile, CompanyID owner, Town *town, u
|
||||
|
||||
for (TileIndex t : ta) {
|
||||
if (IsWaterTile(t)) ClearNeighbourNonFloodingStates(t);
|
||||
if (HasTileWaterGround(t)) InvalidateWaterRegion(t);
|
||||
WaterClass wc = (IsWaterTile(t) ? GetWaterClass(t) : WATER_CLASS_INVALID);
|
||||
/* Update company infrastructure counts for objects build on canals owned by nobody. */
|
||||
if (wc == WATER_CLASS_CANAL && owner != OWNER_NONE && (IsTileOwner(t, OWNER_NONE) || IsTileOwner(t, OWNER_WATER))) {
|
||||
|
Reference in New Issue
Block a user