summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-08-08 18:22:29 +0000
committersmatz <smatz@openttd.org>2009-08-08 18:22:29 +0000
commit0bb34a5d1f92b82bde370e2b69a780e0126d146d (patch)
treecb71da0b8513c7365e8f797282c1b409f9c5b17a
parente28bf66c6d069039000273ed34ba7e3ff1bf17f8 (diff)
downloadopenttd-0bb34a5d1f92b82bde370e2b69a780e0126d146d.tar.xz
(svn r17117) -Fix (r1): don't create pax subsidy when source town, not destination town, has good service
-rw-r--r--src/subsidy.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/subsidy.cpp b/src/subsidy.cpp
index ad79c37e0..44431210a 100644
--- a/src/subsidy.cpp
+++ b/src/subsidy.cpp
@@ -192,11 +192,10 @@ static void FindSubsidyPassengerRoute(FoundRoute *fr)
fr->distance = UINT_MAX;
fr->from = from = Town::GetRandom();
- if (from == NULL || from->population < 400) return;
+ if (from == NULL || from->population < 400 || from->pct_pass_transported > 42) return;
fr->to = to = Town::GetRandom();
- if (from == to || to == NULL || to->population < 400 || to->pct_pass_transported > 42)
- return;
+ if (from == to || to == NULL || to->population < 400) return;
fr->distance = DistanceManhattan(from->xy, to->xy);
}