mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 06:52:05 +01:00
Codechange: No need to call DeleteAnimatedTile and DoClearSquare. (#13191)
DoClearSquare calls DeleteAnimatedTile itself so this is effectively a duplicate call.
This commit is contained in:
@@ -2196,8 +2196,6 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags, int repla
|
|||||||
Company::Get(st->owner)->infrastructure.station--;
|
Company::Get(st->owner)->infrastructure.station--;
|
||||||
DirtyCompanyInfrastructureWindows(st->owner);
|
DirtyCompanyInfrastructureWindows(st->owner);
|
||||||
|
|
||||||
DeleteAnimatedTile(tile);
|
|
||||||
|
|
||||||
uint specindex = GetCustomRoadStopSpecIndex(tile);
|
uint specindex = GetCustomRoadStopSpecIndex(tile);
|
||||||
|
|
||||||
DeleteNewGRFInspectWindow(GSF_ROADSTOPS, tile.base());
|
DeleteNewGRFInspectWindow(GSF_ROADSTOPS, tile.base());
|
||||||
@@ -2205,6 +2203,7 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags, int repla
|
|||||||
if (IsDriveThroughStopTile(tile)) {
|
if (IsDriveThroughStopTile(tile)) {
|
||||||
/* Clears the tile for us */
|
/* Clears the tile for us */
|
||||||
cur_stop->ClearDriveThrough();
|
cur_stop->ClearDriveThrough();
|
||||||
|
DeleteAnimatedTile(tile);
|
||||||
} else {
|
} else {
|
||||||
DoClearSquare(tile);
|
DoClearSquare(tile);
|
||||||
}
|
}
|
||||||
@@ -2279,8 +2278,6 @@ CommandCost RemoveRoadWaypointStop(TileIndex tile, DoCommandFlag flags, int repl
|
|||||||
Company::Get(wp->owner)->infrastructure.station--;
|
Company::Get(wp->owner)->infrastructure.station--;
|
||||||
DirtyCompanyInfrastructureWindows(wp->owner);
|
DirtyCompanyInfrastructureWindows(wp->owner);
|
||||||
|
|
||||||
DeleteAnimatedTile(tile);
|
|
||||||
|
|
||||||
uint specindex = GetCustomRoadStopSpecIndex(tile);
|
uint specindex = GetCustomRoadStopSpecIndex(tile);
|
||||||
|
|
||||||
DeleteNewGRFInspectWindow(GSF_ROADSTOPS, tile.base());
|
DeleteNewGRFInspectWindow(GSF_ROADSTOPS, tile.base());
|
||||||
@@ -2702,7 +2699,6 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
|
|||||||
cost.AddCost(_price[PR_CLEAR_STATION_AIRPORT]);
|
cost.AddCost(_price[PR_CLEAR_STATION_AIRPORT]);
|
||||||
|
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
DeleteAnimatedTile(tile_cur);
|
|
||||||
DoClearSquare(tile_cur);
|
DoClearSquare(tile_cur);
|
||||||
DeleteNewGRFInspectWindow(GSF_AIRPORTTILES, tile_cur.base());
|
DeleteNewGRFInspectWindow(GSF_AIRPORTTILES, tile_cur.base());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2936,7 +2936,6 @@ static void DoClearTownHouseHelper(TileIndex tile, Town *t, HouseID house)
|
|||||||
assert(IsTileType(tile, MP_HOUSE));
|
assert(IsTileType(tile, MP_HOUSE));
|
||||||
DecreaseBuildingCount(t, house);
|
DecreaseBuildingCount(t, house);
|
||||||
DoClearSquare(tile);
|
DoClearSquare(tile);
|
||||||
DeleteAnimatedTile(tile);
|
|
||||||
|
|
||||||
DeleteNewGRFInspectWindow(GSF_HOUSES, tile.base());
|
DeleteNewGRFInspectWindow(GSF_HOUSES, tile.base());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user