(svn r9839) -Fix: vehicles in old savegames could leave the station because the changed loading algorithm thought it was already finished.
authorrubidium
Mon, 14 May 2007 20:17:26 +0000
changeset 7115 ef36e40739c9
parent 7114 665294e21ae8
child 7116 5753c4752490
(svn r9839) -Fix: vehicles in old savegames could leave the station because the changed loading algorithm thought it was already finished.
src/openttd.cpp
--- a/src/openttd.cpp	Mon May 14 20:12:32 2007 +0000
+++ b/src/openttd.cpp	Mon May 14 20:17:26 2007 +0000
@@ -1934,6 +1934,10 @@
 					!(v->vehstatus & (VS_STOPPED | VS_CRASHED)) && // not stopped or crashed
 					v->current_order.type == OT_LOADING) {         // loading
 				GetStation(v->last_station_visited)->loading_vehicles.push_back(v);
+
+				/* The loading finished flag is *only* set when actually completely
+				 * finished. Because the vehicle is loading, it is not finished. */
+				CLRBIT(v->vehicle_flags, VF_LOADING_FINISHED);
 			}
 		}
 	}