diff options
author | smatz <smatz@openttd.org> | 2009-08-07 22:23:34 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-08-07 22:23:34 +0000 |
commit | 74d3382b946d71445fbce5699d1541946e928450 (patch) | |
tree | 03fe2b58ca63a3e1629c08eefbdf061154cc977c /src/subsidy_base.h | |
parent | 39e145e586385861b4e3ded70f7df0a29b56fa00 (diff) | |
download | openttd-74d3382b946d71445fbce5699d1541946e928450.tar.xz |
(svn r17107) -Codechange: store type of subsidy source and destination in the Subsidy struct instead of determining it every time it's needed
Diffstat (limited to 'src/subsidy_base.h')
-rw-r--r-- | src/subsidy_base.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/subsidy_base.h b/src/subsidy_base.h index 790be8c6d..1460c4eec 100644 --- a/src/subsidy_base.h +++ b/src/subsidy_base.h @@ -13,10 +13,12 @@ typedef uint16 SubsidyID; ///< ID of a subsidy /** Struct about subsidies, offered and awarded */ struct Subsidy { - CargoID cargo_type; ///< Cargo type involved in this subsidy, CT_INVALID for invalid subsidy - byte age; ///< Subsidy age; < 12 is unawarded, >= 12 is awarded - uint16 from; ///< Index of source. Either TownID, IndustryID or StationID, when awarded - uint16 to; ///< Index of destination. Either TownID, IndustryID or StationID, when awarded + CargoID cargo_type; ///< Cargo type involved in this subsidy, CT_INVALID for invalid subsidy + byte age; ///< Subsidy age; < 12 is unawarded, >= 12 is awarded + SourceTypeByte src_type; ///< Source of subsidised path + SourceTypeByte dst_type; ///< Destination of subsidised path + uint16 src; ///< Index of source. Either TownID, IndustryID or StationID, when awarded + uint16 dst; ///< Index of destination. Either TownID, IndustryID or StationID, when awarded /** * Tests whether this subsidy has been awarded to someone |