src/tunnelbridge_cmd.cpp
changeset 10017 c0eb11a864d7
parent 10014 13c9ede0ae49
child 10083 eee4e42aa15b
equal deleted inserted replaced
10016:8bfe2fe41d86 10017:c0eb11a864d7
  1470 		Axis axis = DiagDirToAxis(direction);
  1470 		Axis axis = DiagDirToAxis(direction);
  1471 		CommandCost res;
  1471 		CommandCost res;
  1472 		uint z_old;
  1472 		uint z_old;
  1473 		Slope tileh_old = GetTileSlope(tile, &z_old);
  1473 		Slope tileh_old = GetTileSlope(tile, &z_old);
  1474 
  1474 
  1475 		/* Check if new slope is valid for bridges in general (so we can savely call GetBridgeFoundation()) */
  1475 		/* Check if new slope is valid for bridges in general (so we can safely call GetBridgeFoundation()) */
  1476 		if ((direction == DIAGDIR_NW) || (direction == DIAGDIR_NE)) {
  1476 		if ((direction == DIAGDIR_NW) || (direction == DIAGDIR_NE)) {
  1477 			CheckBridgeSlopeSouth(axis, &tileh_old, &z_old);
  1477 			CheckBridgeSlopeSouth(axis, &tileh_old, &z_old);
  1478 			res = CheckBridgeSlopeSouth(axis, &tileh_new, &z_new);
  1478 			res = CheckBridgeSlopeSouth(axis, &tileh_new, &z_new);
  1479 		} else {
  1479 		} else {
  1480 			CheckBridgeSlopeNorth(axis, &tileh_old, &z_old);
  1480 			CheckBridgeSlopeNorth(axis, &tileh_old, &z_old);