src/ship_cmd.cpp
changeset 8830 b288359ab100
parent 8827 730524764a69
child 8836 f6f1ea3d7e93
equal deleted inserted replaced
8829:d0a83a807954 8830:b288359ab100
   242 	PlayShipSound(this);
   242 	PlayShipSound(this);
   243 }
   243 }
   244 
   244 
   245 TileIndex Ship::GetOrderStationLocation(StationID station)
   245 TileIndex Ship::GetOrderStationLocation(StationID station)
   246 {
   246 {
       
   247 	if (station == this->last_station_visited) this->last_station_visited = INVALID_STATION;
       
   248 
   247 	Station *st = GetStation(station);
   249 	Station *st = GetStation(station);
   248 	if (st->dock_tile != 0) {
   250 	if (st->dock_tile != 0) {
   249 		return TILE_ADD(st->dock_tile, ToTileIndexDiff(GetDockOffset(st->dock_tile)));
   251 		return TILE_ADD(st->dock_tile, ToTileIndexDiff(GetDockOffset(st->dock_tile)));
   250 	} else {
   252 	} else {
   251 		this->cur_order_index++;
   253 		this->cur_order_index++;