roadveh_cmd.c
changeset 4519 f53d829de680
parent 4510 54d30a2372c3
child 4526 6d48f07e829e
equal deleted inserted replaced
4518:2d003b496097 4519:f53d829de680
   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);