(svn r16877) -Codechange: use Subsidy::IsAwarded() instead of testing subsidy's age

This commit is contained in:
smatz
2009-07-18 19:54:35 +00:00
parent 196dd0974f
commit 3564579dc4
6 changed files with 24 additions and 15 deletions

View File

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