(svn r10236) -Feature: Introduce a form of timetabling for vehicles.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user