equal
deleted
inserted
replaced
652 * AI will have chance of randomly rejecting routes further than 37 tiles from their network, |
652 * AI will have chance of randomly rejecting routes further than 37 tiles from their network, |
653 * so there will be some attempt to cluster the network together */ |
653 * so there will be some attempt to cluster the network together */ |
654 |
654 |
655 /* Random value between 37 and 292. Low values are exponentially more likely |
655 /* Random value between 37 and 292. Low values are exponentially more likely |
656 * With 50% chance the value will be under 52 tiles */ |
656 * With 50% chance the value will be under 52 tiles */ |
657 int min_distance = 36 + 1 << (Random() % 9); // 0..8 |
657 int min_distance = 36 + (1 << (Random() % 9)); // 0..8 |
658 |
658 |
659 /* Make sure distance to closest station is < min_distance tiles. */ |
659 /* Make sure distance to closest station is < min_distance tiles. */ |
660 if (dist != 0xFFFF && dist > min_distance) return false; |
660 if (dist != 0xFFFF && dist > min_distance) return false; |
661 |
661 |
662 if (p->ai.route_type_mask != 0 && |
662 if (p->ai.route_type_mask != 0 && |