Changeset - r8231:ef8eaa703161
[Not reviewed]
master
0 1 0
glx - 17 years ago 2008-01-09 17:09:53
glx@openttd.org
(svn r11794) -Fix [FS#1632]: reversing a train when loading at a station with an adjacent station in the same axis crashed.
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -1548,7 +1548,10 @@ static void LoadUnloadVehicle(Vehicle *v
 
		return;
 
	}
 

	
 
	if (v->type == VEH_TRAIN && !IsTileType(v->tile, MP_STATION)) {
 
	StationID last_visited = v->last_station_visited;
 
	Station *st = GetStation(last_visited);
 

	
 
	if (v->type == VEH_TRAIN && (!IsTileType(v->tile, MP_STATION) || GetStationIndex(v->tile) != st->index)) {
 
		/* The train reversed in the station. Take the "easy" way
 
		 * out and let the train just leave as it always did. */
 
		SetBit(v->vehicle_flags, VF_LOADING_FINISHED);
 
@@ -1568,9 +1571,6 @@ static void LoadUnloadVehicle(Vehicle *v
 

	
 
	v->cur_speed = 0;
 

	
 
	StationID last_visited = v->last_station_visited;
 
	Station *st = GetStation(last_visited);
 

	
 
	for (; v != NULL; v = v->Next()) {
 
		if (v->cargo_cap == 0) continue;
 

	
0 comments (0 inline, 0 general)