equal
deleted
inserted
replaced
641 /* Make sure distance to closest station is < min_distance tiles. */ |
641 /* Make sure distance to closest station is < min_distance tiles. */ |
642 if (dist != 0xFFFF && dist > min_distance) return false; |
642 if (dist != 0xFFFF && dist > min_distance) return false; |
643 |
643 |
644 if (p->ai.route_type_mask != 0 && |
644 if (p->ai.route_type_mask != 0 && |
645 !(p->ai.route_type_mask & bitmask) && |
645 !(p->ai.route_type_mask & bitmask) && |
646 !CHANCE16(1, 5)) { |
646 !Chance16(1, 5)) { |
647 return false; |
647 return false; |
648 } |
648 } |
649 |
649 |
650 if (fr->cargo == CT_PASSENGERS || fr->cargo == CT_MAIL) { |
650 if (fr->cargo == CT_PASSENGERS || fr->cargo == CT_MAIL) { |
651 const Town* from = (const Town*)fr->from; |
651 const Town* from = (const Town*)fr->from; |
1450 * Practical experiments with AI show that the non-full-load aircrafts are usually |
1450 * Practical experiments with AI show that the non-full-load aircrafts are usually |
1451 * those that survive |
1451 * those that survive |
1452 * Also, non-full load is more resistant against starving (by building better stations |
1452 * Also, non-full load is more resistant against starving (by building better stations |
1453 * or using exclusive rights) |
1453 * or using exclusive rights) |
1454 */ |
1454 */ |
1455 p->ai.num_want_fullload = CHANCE16(1, 5); // 20% chance |
1455 p->ai.num_want_fullload = Chance16(1, 5); // 20% chance |
1456 // p->ai.loco_id = INVALID_VEHICLE; |
1456 // p->ai.loco_id = INVALID_VEHICLE; |
1457 p->ai.order_list_blocks[0] = 0; |
1457 p->ai.order_list_blocks[0] = 0; |
1458 p->ai.order_list_blocks[1] = 1; |
1458 p->ai.order_list_blocks[1] = 1; |
1459 p->ai.order_list_blocks[2] = 255; |
1459 p->ai.order_list_blocks[2] = 255; |
1460 |
1460 |