Fix wrong tile for old canal ownership check in CmdBuildCanal
This commit is contained in:
@@ -513,7 +513,7 @@ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
|||||||
|
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
if (IsTileType(current_tile, MP_WATER) && IsCanal(current_tile)) {
|
if (IsTileType(current_tile, MP_WATER) && IsCanal(current_tile)) {
|
||||||
Owner owner = GetTileOwner(tile);
|
Owner owner = GetTileOwner(current_tile);
|
||||||
if (Company::IsValidID(owner)) {
|
if (Company::IsValidID(owner)) {
|
||||||
Company::Get(owner)->infrastructure.water--;
|
Company::Get(owner)->infrastructure.water--;
|
||||||
DirtyCompanyInfrastructureWindows(owner);
|
DirtyCompanyInfrastructureWindows(owner);
|
||||||
|
Reference in New Issue
Block a user