Changeset - r12940:ba419d226b67
[Not reviewed]
master
0 2 0
rubidium - 15 years ago 2009-09-07 08:35:45
rubidium@openttd.org
(svn r17443) -Fix (r17442): clear the depot tile after removing the depot in all cases instead of only for ships; makes removing road/rail depots not crash :)
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/rail_cmd.cpp
Show inline comments
 
@@ -1442,8 +1442,8 @@ static CommandCost RemoveTrainDepot(Tile
 
			if (v != NULL) FreeTrainTrackReservation(v);
 
		}
 

	
 
		delete Depot::GetByTile(tile);
 
		DoClearSquare(tile);
 
		delete Depot::GetByTile(tile);
 
		AddSideToSignalBuffer(tile, dir, owner);
 
		YapfNotifyTrackLayoutChange(tile, DiagDirToDiagTrack(dir));
 
		if (v != NULL) TryPathReserve(v, true);
src/road_cmd.cpp
Show inline comments
 
@@ -895,8 +895,8 @@ static CommandCost RemoveRoadDepot(TileI
 
	if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
 

	
 
	if (flags & DC_EXEC) {
 
		delete Depot::GetByTile(tile);
 
		DoClearSquare(tile);
 
		delete Depot::GetByTile(tile);
 
	}
 

	
 
	return CommandCost(EXPENSES_CONSTRUCTION, _price.remove_road_depot);
0 comments (0 inline, 0 general)