File diff r15072:0c171c464368 → r15073:02cc9885c126
src/rail_cmd.cpp
Show inline comments
 
@@ -16,12 +16,13 @@
 
#include "command_func.h"
 
#include "engine_base.h"
 
#include "depot_base.h"
 
#include "pathfinder/yapf/yapf_cache.h"
 
#include "newgrf_engine.h"
 
#include "landscape_type.h"
 
#include "newgrf_debug.h"
 
#include "newgrf_railtype.h"
 
#include "newgrf_commons.h"
 
#include "train.h"
 
#include "variables.h"
 
#include "autoslope.h"
 
#include "water.h"
 
@@ -534,12 +535,13 @@ CommandCost CmdRemoveSingleRail(TileInde
 
				if (HasReservedTracks(tile, trackbit)) {
 
					v = GetTrainForReservation(tile, track);
 
					if (v != NULL) FreeTrainTrackReservation(v);
 
				}
 
				owner = GetTileOwner(tile);
 
				MakeRoadNormal(tile, GetCrossingRoadBits(tile), GetRoadTypes(tile), GetTownIndex(tile), GetRoadOwner(tile, ROADTYPE_ROAD), GetRoadOwner(tile, ROADTYPE_TRAM));
 
				DeleteNewGRFInspectWindow(GSF_RAILTYPES, tile);
 
			}
 
			break;
 
		}
 

	
 
		case MP_RAILWAY: {
 
			TrackBits present;
 
@@ -576,12 +578,13 @@ CommandCost CmdRemoveSingleRail(TileInde
 
					/* If there is flat water on the lower halftile, convert the tile to shore so the water remains */
 
					if (GetRailGroundType(tile) == RAIL_GROUND_WATER && IsSlopeWithOneCornerRaised(tileh)) {
 
						MakeShore(tile);
 
					} else {
 
						DoClearSquare(tile);
 
					}
 
					DeleteNewGRFInspectWindow(GSF_RAILTYPES, tile);
 
				} else {
 
					SetTrackBits(tile, present);
 
					SetTrackReservation(tile, GetRailReservationTrackBits(tile) & present);
 
				}
 
			}
 
			break;