File diff r4548:6a33e364fba5 → r4549:76b9213799ac
station_cmd.c
Show inline comments
 
/* $Id$ */
 

	
 
/** @file station_cmd.c
 
  */
 
/** @file station_cmd.c */
 

	
 
#include "stdafx.h"
 
#include "openttd.h"
 
#include "debug.h"
 
#include "functions.h"
 
#include "station_map.h"
 
@@ -166,13 +165,13 @@ RoadStop *AllocateRoadStop(void)
 
	if (AddBlockToPool(&_roadstop_pool)) return AllocateRoadStop();
 

	
 
	return NULL;
 
}
 

	
 
/* Calculate the radius of the station. Basicly it is the biggest
 
    radius that is available within the station */
 
 *  radius that is available within the station */
 
static uint FindCatchmentRadius(const Station* st)
 
{
 
	uint ret = 0;
 

	
 
	if (st->bus_stops != NULL)   ret = max(ret, CA_BUS);
 
	if (st->truck_stops != NULL) ret = max(ret, CA_TRUCK);
 
@@ -780,18 +779,18 @@ int32 CheckFlatLandBelow(TileIndex tile,
 
	BEGIN_TILE_LOOP(tile_cur, w, h, tile)
 
		if (!EnsureNoVehicle(tile_cur)) return CMD_ERROR;
 

	
 
		tileh = GetTileSlope(tile_cur, &z);
 

	
 
		/* Prohibit building if
 
			1) The tile is "steep" (i.e. stretches two height levels)
 
			-OR-
 
			2) The tile is non-flat if
 
				a) the player building is an "old-school" AI
 
				-OR-
 
				b) the build_on_slopes switch is disabled
 
		 *   1) The tile is "steep" (i.e. stretches two height levels)
 
		 * -OR-
 
		 *   2) The tile is non-flat if
 
		 *     a) the player building is an "old-school" AI
 
		 *   -OR-
 
		 *     b) the build_on_slopes switch is disabled
 
		*/
 
		if (IsSteepSlope(tileh) ||
 
				((_is_old_ai_player || !_patches.build_on_slopes) && tileh != SLOPE_FLAT)) {
 
			return_cmd_error(STR_0007_FLAT_LAND_REQUIRED);
 
		}