src/road_cmd.cpp
changeset 7967 a230c063a672
parent 7954 57b51c69c072
child 8043 08dcb2d81d9d
equal deleted inserted replaced
7966:0c6e2703634c 7967:a230c063a672
  1241 
  1241 
  1242 			/* Show an animation to indicate road work */
  1242 			/* Show an animation to indicate road work */
  1243 			if (t->road_build_months != 0 &&
  1243 			if (t->road_build_months != 0 &&
  1244 					(DistanceManhattan(t->xy, tile) < 8 || grp != 0) &&
  1244 					(DistanceManhattan(t->xy, tile) < 8 || grp != 0) &&
  1245 					GetRoadTileType(tile) == ROAD_TILE_NORMAL && CountBits(GetAllRoadBits(tile)) > 1 ) {
  1245 					GetRoadTileType(tile) == ROAD_TILE_NORMAL && CountBits(GetAllRoadBits(tile)) > 1 ) {
  1246 				if (GetTileSlope(tile, NULL) == SLOPE_FLAT && EnsureNoVehicleOnGround(tile) && CHANCE16(1, 40)) {
  1246 				if (GetTileSlope(tile, NULL) == SLOPE_FLAT && EnsureNoVehicleOnGround(tile) && Chance16(1, 40)) {
  1247 					StartRoadWorks(tile);
  1247 					StartRoadWorks(tile);
  1248 
  1248 
  1249 					SndPlayTileFx(SND_21_JACKHAMMER, tile);
  1249 					SndPlayTileFx(SND_21_JACKHAMMER, tile);
  1250 					CreateEffectVehicleAbove(
  1250 					CreateEffectVehicleAbove(
  1251 						TileX(tile) * TILE_SIZE + 7,
  1251 						TileX(tile) * TILE_SIZE + 7,