diff -r dce9a6923bb7 -r 0b2aebc8283e src/ship_cmd.cpp --- a/src/ship_cmd.cpp Wed Jun 13 11:00:24 2007 +0000 +++ b/src/ship_cmd.cpp Wed Jun 13 11:17:30 2007 +0000 @@ -406,7 +406,7 @@ uint spd; byte t; - spd = min(v->cur_speed + 1, v->max_speed); + spd = min(v->cur_speed + 1, GetVehicleProperty(v, 0x0B, v->max_speed)); /*updates statusbar only if speed have changed to save CPU time */ if (spd != v->cur_speed) { @@ -551,7 +551,7 @@ * direction in which we are entering the tile */ static Track ChooseShipTrack(Vehicle *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks) { - assert(enterdir>=0 && enterdir<=3); + assert(enterdir >= 0 && enterdir <= 3); if (_patches.yapf.ship_use_yapf) { Trackdir trackdir = YapfChooseShipTrack(v, tile, enterdir, tracks); @@ -654,11 +654,11 @@ }, { { 0, 0, 0}, - { 8,15, 7}, + { 8, 15, 7}, { 0, 0, 0}, - { 8,15, 6}, + { 8, 15, 6}, { 0, 0, 0}, - { 7,15, 0}, + { 7, 15, 0}, } }; @@ -880,7 +880,7 @@ y = TileY(tile) * TILE_SIZE + TILE_SIZE / 2; v->x_pos = x; v->y_pos = y; - v->z_pos = GetSlopeZ(x,y); + v->z_pos = GetSlopeZ(x, y); v->z_height = 6; v->sprite_width = 6; @@ -1065,6 +1065,8 @@ if (dep == NULL) return_cmd_error(STR_981A_UNABLE_TO_FIND_LOCAL_DEPOT); if (flags & DC_EXEC) { + if (v->current_order.type == OT_LOADING) v->LeaveStation(); + v->dest_tile = dep->xy; v->current_order.type = OT_GOTO_DEPOT; v->current_order.flags = OF_NON_STOP;