mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r13366) -Fix: clicking in the Subsidies window was broken
This commit is contained in:
parent
def3177d3a
commit
00851610e1
@ -37,23 +37,29 @@ struct SubsidyListWindow : Window {
|
||||
for (const Subsidy *s = _subsidies; s != endof(_subsidies); s++) {
|
||||
if (s->cargo_type != CT_INVALID && s->age < 12) {
|
||||
y -= 10;
|
||||
if (y < 0) this->HandleClick(s);
|
||||
if (y < 0) {
|
||||
this->HandleClick(s);
|
||||
return;
|
||||
}
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
if (num == 0) {
|
||||
y -= 10;
|
||||
y -= 10; /* "None" */
|
||||
if (y < 0) return;
|
||||
}
|
||||
|
||||
y -= 11;
|
||||
y -= 11; /* "Services already subsidised:" */
|
||||
if (y < 0) return;
|
||||
|
||||
for (const Subsidy *s = _subsidies; s != endof(_subsidies); s++) {
|
||||
if (s->cargo_type != CT_INVALID && s->age >= 12) {
|
||||
y -= 10;
|
||||
if (y < 0) this->HandleClick(s);
|
||||
if (y < 0) {
|
||||
this->HandleClick(s);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user