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