src/rail_cmd.cpp
changeset 9860 b7e82afa0df7
parent 9830 566cbd04836f
child 9866 c99f3ec0b91f
equal deleted inserted replaced
9859:28606a486c52 9860:b7e82afa0df7
   292 
   292 
   293 	Foundation f_new = GetRailFoundation(tileh, rail_bits | existing);
   293 	Foundation f_new = GetRailFoundation(tileh, rail_bits | existing);
   294 
   294 
   295 	/* check track/slope combination */
   295 	/* check track/slope combination */
   296 	if ((f_new == FOUNDATION_INVALID) ||
   296 	if ((f_new == FOUNDATION_INVALID) ||
   297 	    ((f_new != FOUNDATION_NONE) && (!_settings_game.construction.build_on_slopes || _is_old_ai_player))
   297 			((f_new != FOUNDATION_NONE) && (!_settings_game.construction.build_on_slopes || _is_old_ai_player))) {
   298 	   ) return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION);
   298 		return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION);
       
   299 	}
   299 
   300 
   300 	Foundation f_old = GetRailFoundation(tileh, existing);
   301 	Foundation f_old = GetRailFoundation(tileh, existing);
   301 	return CommandCost(EXPENSES_CONSTRUCTION, f_new != f_old ? _price.terraform : (Money)0);
   302 	return CommandCost(EXPENSES_CONSTRUCTION, f_new != f_old ? _price.terraform : (Money)0);
   302 }
   303 }
   303 
   304