summaryrefslogtreecommitdiff
path: root/src/order.h
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-06-20 19:17:22 +0000
committermaedhros <maedhros@openttd.org>2007-06-20 19:17:22 +0000
commitcf0118ee63603132dc1d08d7f7e800b26e53fc97 (patch)
tree1a82d9ac3d2c0f66dac9c5f6857c4e49f057b100 /src/order.h
parenta982fe2e807f80c8a6478c358b3875535c9346b4 (diff)
downloadopenttd-cf0118ee63603132dc1d08d7f7e800b26e53fc97.tar.xz
(svn r10236) -Feature: Introduce a form of timetabling for vehicles.
Diffstat (limited to 'src/order.h')
-rw-r--r--src/order.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/order.h b/src/order.h
index 3a2ddb1f3..9703989e8 100644
--- a/src/order.h
+++ b/src/order.h
@@ -86,7 +86,7 @@ enum {
/* If you change this, keep in mind that it is saved on 3 places:
* - Load_ORDR, all the global orders
* - Vehicle -> current_order
- * - REF_SHEDULE (all REFs are currently limited to 16 bits!!)
+ * - REF_ORDER (all REFs are currently limited to 16 bits!!)
*/
struct Order {
Order *next; ///< Pointer to next order. If NULL, end of list
@@ -100,6 +100,9 @@ struct Order {
CargoID refit_cargo; // Refit CargoID
byte refit_subtype; // Refit subtype
+ uint16 wait_time; ///< How long in ticks to wait at the destination.
+ uint16 travel_time; ///< How long in ticks the journey to this destination should take.
+
bool IsValid() const;
void Free();
void FreeChain();
@@ -197,6 +200,8 @@ static inline Order UnpackOrder(uint32 packed)
order.index = 0; // avoid compiler warning
order.refit_cargo = CT_NO_REFIT;
order.refit_subtype = 0;
+ order.wait_time = 0;
+ order.travel_time = 0;
return order;
}