File diff r12404:d58b2d050240 → r12405:ba094e765533
src/subsidy_gui.cpp
Show inline comments
 
@@ -69,25 +69,25 @@ struct SubsidyListWindow : Window {
 
			if (s->age >= 12) {
 
				y -= FONT_HEIGHT_NORMAL;
 
				if (y < 0) {
 
					this->HandleClick(s);
 
					return;
 
				}
 
			}
 
		}
 
	}
 

	
 
	void HandleClick(const Subsidy *s)
 
	{
 
		TownEffect te = GetCargo(s->cargo_type)->town_effect;
 
		TownEffect te = CargoSpec::Get(s->cargo_type)->town_effect;
 
		TileIndex xy;
 

	
 
		/* determine from coordinate for subsidy and try to scroll to it */
 
		uint offs = s->from;
 
		if (s->age >= 12) {
 
			xy = Station::Get(offs)->xy;
 
		} else if (te == TE_PASSENGERS || te == TE_MAIL) {
 
			xy = Town::Get(offs)->xy;
 
		} else {
 
			xy = Industry::Get(offs)->xy;
 
		}