station_cmd.c
changeset 3933 231ae3c419f4
parent 3928 53fe96558353
child 3977 513433ebd092
equal deleted inserted replaced
3932:dfe10fa5ce4f 3933:231ae3c419f4
     3 /** @file station_cmd.c
     3 /** @file station_cmd.c
     4   */
     4   */
     5 
     5 
     6 #include "stdafx.h"
     6 #include "stdafx.h"
     7 #include "openttd.h"
     7 #include "openttd.h"
       
     8 #include "bridge_map.h"
     8 #include "debug.h"
     9 #include "debug.h"
     9 #include "functions.h"
    10 #include "functions.h"
    10 #include "station_map.h"
    11 #include "station_map.h"
    11 #include "table/sprites.h"
    12 #include "table/sprites.h"
    12 #include "table/strings.h"
    13 #include "table/strings.h"
   780 	uint z;
   781 	uint z;
   781 	int allowed_z = -1;
   782 	int allowed_z = -1;
   782 	int flat_z;
   783 	int flat_z;
   783 
   784 
   784 	BEGIN_TILE_LOOP(tile_cur, w, h, tile)
   785 	BEGIN_TILE_LOOP(tile_cur, w, h, tile)
       
   786 		if (MayHaveBridgeAbove(tile_cur) && IsBridgeAbove(tile_cur)) {
       
   787 			return_cmd_error(STR_5007_MUST_DEMOLISH_BRIDGE_FIRST);
       
   788 		}
       
   789 
   785 		if (!EnsureNoVehicle(tile_cur)) return CMD_ERROR;
   790 		if (!EnsureNoVehicle(tile_cur)) return CMD_ERROR;
   786 
   791 
   787 		tileh = GetTileSlope(tile_cur, &z);
   792 		tileh = GetTileSlope(tile_cur, &z);
   788 
   793 
   789 		/* Prohibit building if
   794 		/* Prohibit building if