Changeset - r13041:acd808f364d5
[Not reviewed]
master
0 1 0
frosch - 15 years ago 2009-09-15 18:47:42
frosch@openttd.org
(svn r17549) -Fix (r17128): Distance limit for town to town subsidies got lost.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/subsidy.cpp
Show inline comments
 
@@ -182,13 +182,13 @@ static Subsidy *FindSubsidyPassengerRout
 

	
 
	const Town *dst = Town::GetRandom();
 
	if (dst->population < SUBSIDY_PAX_MIN_POPULATION || src == dst) {
 
		return NULL;
 
	}
 

	
 
	if (DistanceManhattan(src->xy, src->xy) > SUBSIDY_MAX_DISTANCE) return NULL;
 
	if (DistanceManhattan(src->xy, dst->xy) > SUBSIDY_MAX_DISTANCE) return NULL;
 
	if (CheckSubsidyDuplicate(CT_PASSENGERS, ST_TOWN, src->index, ST_TOWN, dst->index)) return NULL;
 

	
 
	Subsidy *s = new Subsidy();
 
	s->cargo_type = CT_PASSENGERS;
 
	s->src_type = s->dst_type = ST_TOWN;
 
	s->src = src->index;
0 comments (0 inline, 0 general)