equal
deleted
inserted
replaced
166 v->tile = tile; |
166 v->tile = tile; |
167 x = TileX(tile) * TILE_SIZE + TILE_SIZE / 2; |
167 x = TileX(tile) * TILE_SIZE + TILE_SIZE / 2; |
168 y = TileY(tile) * TILE_SIZE + TILE_SIZE / 2; |
168 y = TileY(tile) * TILE_SIZE + TILE_SIZE / 2; |
169 v->x_pos = x; |
169 v->x_pos = x; |
170 v->y_pos = y; |
170 v->y_pos = y; |
171 v->z_pos = GetSlopeZ(x,y); |
171 v->z_pos = GetSlopeZ(x, y); |
172 v->z_height = 6; |
172 v->z_height = 6; |
173 |
173 |
174 v->u.road.state = RVSB_IN_DEPOT; |
174 v->u.road.state = RVSB_IN_DEPOT; |
175 v->vehstatus = VS_HIDDEN|VS_STOPPED|VS_DEFPAL; |
175 v->vehstatus = VS_HIDDEN | VS_STOPPED | VS_DEFPAL; |
176 |
176 |
177 v->spritenum = rvi->image_index; |
177 v->spritenum = rvi->image_index; |
178 v->cargo_type = rvi->cargo_type; |
178 v->cargo_type = rvi->cargo_type; |
179 v->cargo_subtype = 0; |
179 v->cargo_subtype = 0; |
180 v->cargo_cap = rvi->capacity; |
180 v->cargo_cap = rvi->capacity; |
434 |
434 |
435 dep = FindClosestRoadDepot(v); |
435 dep = FindClosestRoadDepot(v); |
436 if (dep == NULL) return_cmd_error(STR_9019_UNABLE_TO_FIND_LOCAL_DEPOT); |
436 if (dep == NULL) return_cmd_error(STR_9019_UNABLE_TO_FIND_LOCAL_DEPOT); |
437 |
437 |
438 if (flags & DC_EXEC) { |
438 if (flags & DC_EXEC) { |
|
439 if (v->current_order.type == OT_LOADING) v->LeaveStation(); |
|
440 |
439 ClearSlot(v); |
441 ClearSlot(v); |
440 v->current_order.type = OT_GOTO_DEPOT; |
442 v->current_order.type = OT_GOTO_DEPOT; |
441 v->current_order.flags = OF_NON_STOP; |
443 v->current_order.flags = OF_NON_STOP; |
442 if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); |
444 if (!(p2 & DEPOT_SERVICE)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); |
443 v->current_order.refit_cargo = CT_INVALID; |
445 v->current_order.refit_cargo = CT_INVALID; |