summaryrefslogtreecommitdiff
path: root/src/subsidy.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-26 15:08:54 +0000
committersmatz <smatz@openttd.org>2009-06-26 15:08:54 +0000
commitff33ed94ceef4dabb45b5f8ccbae81a1c4402ba6 (patch)
tree7772bd531c7e63794d47fdeecfea6399fe5697a6 /src/subsidy.cpp
parentb668c24d463ca8059fd9be59efddb39298de9646 (diff)
downloadopenttd-ff33ed94ceef4dabb45b5f8ccbae81a1c4402ba6.tar.xz
(svn r16667) -Codechange: replace GetRandomTown() and GetRandomIndustry() by Town::GetRandom() and Industry::GetRandom()
Diffstat (limited to 'src/subsidy.cpp')
-rw-r--r--src/subsidy.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/subsidy.cpp b/src/subsidy.cpp
index c61129099..fbc8c01c6 100644
--- a/src/subsidy.cpp
+++ b/src/subsidy.cpp
@@ -126,10 +126,10 @@ static void FindSubsidyPassengerRoute(FoundRoute *fr)
fr->distance = UINT_MAX;
- fr->from = from = GetRandomTown();
+ fr->from = from = Town::GetRandom();
if (from == NULL || from->population < 400) return;
- fr->to = to = GetRandomTown();
+ fr->to = to = Town::GetRandom();
if (from == to || to == NULL || to->population < 400 || to->pct_pass_transported > 42)
return;
@@ -144,7 +144,7 @@ static void FindSubsidyCargoRoute(FoundRoute *fr)
fr->distance = UINT_MAX;
- fr->from = i = GetRandomIndustry();
+ fr->from = i = Industry::GetRandom();
if (i == NULL) return;
/* Randomize cargo type */
@@ -170,7 +170,7 @@ static void FindSubsidyCargoRoute(FoundRoute *fr)
if (cs->town_effect == TE_GOODS || cs->town_effect == TE_FOOD) {
/* The destination is a town */
- Town *t = GetRandomTown();
+ Town *t = Town::GetRandom();
/* Only want big towns */
if (t == NULL || t->population < 900) return;
@@ -179,7 +179,7 @@ static void FindSubsidyCargoRoute(FoundRoute *fr)
fr->to = t;
} else {
/* The destination is an industry */
- Industry *i2 = GetRandomIndustry();
+ Industry *i2 = Industry::GetRandom();
/* The industry must accept the cargo */
if (i2 == NULL || i == i2 ||