Changeset - r8928:b99c60f72521
[Not reviewed]
master
0 2 0
rubidium - 16 years ago 2008-04-14 07:08:43
rubidium@openttd.org
(svn r12698) -Codechange: skip orders to stations that do not have a train part anymore, just like is done for road vehicles and ships.
2 files changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/ship_cmd.cpp
Show inline comments
 
@@ -240,13 +240,13 @@ void Ship::PlayLeaveStationSound() const
 
}
 

	
 
TileIndex Ship::GetOrderStationLocation(StationID station)
 
{
 
	if (station == this->last_station_visited) this->last_station_visited = INVALID_STATION;
 

	
 
	Station *st = GetStation(station);
 
	const Station *st = GetStation(station);
 
	if (st->dock_tile != 0) {
 
		return TILE_ADD(st->dock_tile, ToTileIndexDiff(GetDockOffset(st->dock_tile)));
 
	} else {
 
		this->cur_order_index++;
 
		return 0;
 
	}
src/train_cmd.cpp
Show inline comments
 
@@ -2560,13 +2560,20 @@ bad:;
 
}
 

	
 
TileIndex Train::GetOrderStationLocation(StationID station)
 
{
 
	if (station == this->last_station_visited) this->last_station_visited = INVALID_STATION;
 

	
 
	return GetStation(station)->xy;
 
	const Station *st = GetStation(station);
 
	if (!(st->facilities & FACIL_TRAIN)) {
 
		/* The destination station has no trainstation tiles. */
 
		this->cur_order_index++;
 
		return 0;
 
	}
 

	
 
	return st->xy;
 
}
 

	
 
void Train::MarkDirty()
 
{
 
	Vehicle *v = this;
 
	do {
0 comments (0 inline, 0 general)