Fix #9591: Update station docking tiles upon placing a water object on a docking tile (#9594)

This commit is contained in:
SamuXarick
2021-10-03 11:54:19 +01:00
committed by GitHub
parent e4ad632989
commit e404d16929
3 changed files with 7 additions and 3 deletions

View File

@@ -32,6 +32,7 @@
#include "date_func.h"
#include "newgrf_debug.h"
#include "vehicle_func.h"
#include "station_func.h"
#include "table/strings.h"
#include "table/object_land.h"
@@ -121,7 +122,9 @@ void BuildObject(ObjectType type, TileIndex tile, CompanyID owner, Town *town, u
Company::Get(owner)->infrastructure.water++;
DirtyCompanyInfrastructureWindows(owner);
}
bool remove = IsDockingTile(t);
MakeObject(t, owner, o->index, wc, Random());
if (remove) RemoveDockingTile(t);
MarkTileDirtyByTile(t);
}