mirror of https://github.com/OpenTTD/OpenTTD
(svn r2119) - Fix: [ 1172878 ] Trains "Go to depot" button: click twice skip to next order (patch by Loic GUILLOUX). I also added short explanation of OF_/OFB_ difference to order.h.
parent
35ff9d850c
commit
2857b71214
5
order.h
5
order.h
|
@ -15,6 +15,8 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Order flags -- please use OFB instead OF and use HASBIT/SETBIT/CLEARBIT */
|
/* Order flags -- please use OFB instead OF and use HASBIT/SETBIT/CLEARBIT */
|
||||||
|
|
||||||
|
/* Order flag masks - these are for direct bit operations */
|
||||||
enum {
|
enum {
|
||||||
//Flags for stations:
|
//Flags for stations:
|
||||||
OF_UNLOAD = 0x2,
|
OF_UNLOAD = 0x2,
|
||||||
|
@ -28,7 +30,7 @@ enum {
|
||||||
OF_NON_STOP = 0x8
|
OF_NON_STOP = 0x8
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Order flags bits */
|
/* Order flags bits - these are for the *BIT macros */
|
||||||
enum {
|
enum {
|
||||||
OFB_UNLOAD = 1,
|
OFB_UNLOAD = 1,
|
||||||
OFB_FULL_LOAD = 2,
|
OFB_FULL_LOAD = 2,
|
||||||
|
@ -37,6 +39,7 @@ enum {
|
||||||
OFB_NON_STOP = 3
|
OFB_NON_STOP = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Possible clone options */
|
/* Possible clone options */
|
||||||
enum {
|
enum {
|
||||||
CO_SHARE = 0,
|
CO_SHARE = 0,
|
||||||
|
|
|
@ -1360,7 +1360,7 @@ int32 CmdTrainGotoDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||||
|
|
||||||
if (v->current_order.type == OT_GOTO_DEPOT) {
|
if (v->current_order.type == OT_GOTO_DEPOT) {
|
||||||
if (flags & DC_EXEC) {
|
if (flags & DC_EXEC) {
|
||||||
if (HASBIT(v->current_order.flags, OF_PART_OF_ORDERS)) {
|
if (HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
|
||||||
v->u.rail.days_since_order_progr = 0;
|
v->u.rail.days_since_order_progr = 0;
|
||||||
v->cur_order_index++;
|
v->cur_order_index++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue