equal
deleted
inserted
replaced
380 |
380 |
381 if (v->vehstatus & VS_CRASHED) return CMD_ERROR; |
381 if (v->vehstatus & VS_CRASHED) return CMD_ERROR; |
382 |
382 |
383 /* If the current orders are already goto-depot */ |
383 /* If the current orders are already goto-depot */ |
384 if (v->current_order.type == OT_GOTO_DEPOT) { |
384 if (v->current_order.type == OT_GOTO_DEPOT) { |
385 if ((p2 & DEPOT_SERVICE) == (bool)HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) { |
385 if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) { |
386 /* We called with a different DEPOT_SERVICE setting. |
386 /* We called with a different DEPOT_SERVICE setting. |
387 * Now we change the setting to apply the new one and let the vehicle head for the same depot. |
387 * Now we change the setting to apply the new one and let the vehicle head for the same depot. |
388 * Note: the if is (true for requesting service == true for ordered to stop in depot) */ |
388 * Note: the if is (true for requesting service == true for ordered to stop in depot) */ |
389 if (flags & DC_EXEC) { |
389 if (flags & DC_EXEC) { |
390 TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); |
390 TOGGLEBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); |