Mercurial > hg > openttd
diff src/subsidy_base.h @ 12443:575fb5207d86 draft
(svn r16877) -Codechange: use Subsidy::IsAwarded() instead of testing subsidy's age
author | smatz <smatz@openttd.org> |
---|---|
date | Sat, 18 Jul 2009 19:54:35 +0000 (2009-07-18) |
parents | e8f5aa4ce79b |
children | 972cc76db7c0 |
line wrap: on
line diff
--- a/src/subsidy_base.h +++ b/src/subsidy_base.h @@ -18,6 +18,15 @@ uint16 to; ///< Index of destination. Either TownID, IndustryID or StationID, when awarded /** + * Tests whether this subsidy has been awarded to someone + * @return is this subsidy awarded? + */ + FORCEINLINE bool IsAwarded() const + { + return this->age >= 12; + } + + /** * Determines index of this subsidy * @return index (in the Subsidy::array array) */