summaryrefslogtreecommitdiff
path: root/src/engine_base.h
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-09 16:55:03 +0000
committerfrosch <frosch@openttd.org>2012-12-09 16:55:03 +0000
commit0e4b212c4539afb9d8622862d7e03bf2217058f8 (patch)
tree676292ccfbd04f4b61e621682f9546535e2a479d /src/engine_base.h
parent2bb54f09d8ad249f009ab10c9b398fc8b444e5b3 (diff)
downloadopenttd-0e4b212c4539afb9d8622862d7e03bf2217058f8.tar.xz
(svn r24810) -Fix: Make engine preview offers more robust wrt. changes in the company ranking.
Diffstat (limited to 'src/engine_base.h')
-rw-r--r--src/engine_base.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/engine_base.h b/src/engine_base.h
index af57d3717..789a26d1a 100644
--- a/src/engine_base.h
+++ b/src/engine_base.h
@@ -33,8 +33,9 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
uint16 duration_phase_2; ///< Second reliability phase in months, keeping #reliability_max.
uint16 duration_phase_3; ///< Third reliability phase on months, decaying to #reliability_final.
byte flags; ///< Flags of the engine. @see EngineFlags
- uint8 preview_company_rank; ///< Rank of the company that is offered a preview. \c 0xFF means no company.
- byte preview_wait; ///< Daily countdown timer for timeout of offering the engine to the #preview_company_rank company.
+ CompanyMask preview_asked; ///< Bit for each company which has already been offered a preview.
+ CompanyByte preview_company;///< Company which is currently being offered a preview \c INVALID_COMPANY means no company.
+ byte preview_wait; ///< Daily countdown timer for timeout of offering the engine to the #preview_company company.
CompanyMask company_avail; ///< Bit for each company whether the engine is available for that company.
uint8 original_image_index; ///< Original vehicle image index, thus the image index of the overridden vehicle
VehicleType type; ///< %Vehicle type, ie #VEH_ROAD, #VEH_TRAIN, etc.