diff options
Diffstat (limited to 'ai/default')
-rw-r--r-- | ai/default/default.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ai/default/default.c b/ai/default/default.c index 3de583bf4..08af2b119 100644 --- a/ai/default/default.c +++ b/ai/default/default.c @@ -441,14 +441,12 @@ typedef struct FoundRoute { static Town *AiFindRandomTown(void) { - Town *t = GetTown(RandomRange(GetTownArraySize())); - return IsValidTown(t) ? t : NULL; + return GetRandomTown(); } static Industry *AiFindRandomIndustry(void) { - Industry *i = GetIndustry(RandomRange(GetIndustryArraySize())); - return IsValidIndustry(i) ? i : NULL; + return GetRandomIndustry(); } static void AiFindSubsidyIndustryRoute(FoundRoute *fr) |