Skip to content

Commit

Permalink
Fix OpenTTD#9591: Update station docking tiles upon placing a water o…
Browse files Browse the repository at this point in the history
…bject on a docking tile
  • Loading branch information
SamuXarick committed Oct 2, 2021
1 parent a53cfee commit 41e7040
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/object_cmd.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 41e7040

Please sign in to comment.