(svn r17107) -Codechange: store type of subsidy source and destination in the Subsidy struct instead of determining it every time it's needed

This commit is contained in:
smatz
2009-08-07 22:23:34 +00:00
parent 39e145e586
commit 74d3382b94
13 changed files with 157 additions and 171 deletions

View File

@@ -331,7 +331,7 @@ void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner)
if (new_owner == INVALID_OWNER) {
Subsidy *s;
FOR_ALL_SUBSIDIES(s) {
if (s->IsAwarded() && Station::Get(s->to)->owner == old_owner) {
if (s->IsAwarded() && Station::Get(s->dst)->owner == old_owner) {
s->cargo_type = CT_INVALID;
}
}