Changeset - r8582:ae8b3cb65d87
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-02-16 22:29:30
smatz@openttd.org
(svn r12163) -Fix [FS#1705]: if a train is 'stopping' when entering a depot, do not let it leave again
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -613,8 +613,10 @@ static Vehicle* _first_veh_in_depot_list
 
 */
 
void VehicleEnteredDepotThisTick(Vehicle *v)
 
{
 
	/* we need to set v->leave_depot_instantly as we have no control of it's contents at this time */
 
	if (HasBit(v->current_order.flags, OF_HALT_IN_DEPOT) && !HasBit(v->current_order.flags, OF_PART_OF_ORDERS) && v->current_order.type == OT_GOTO_DEPOT) {
 
	/* We need to set v->leave_depot_instantly as we have no control of it's contents at this time.
 
	 * Vehicle should stop in the depot if it was in 'stopping' state - train intered depot while slowing down. */
 
	if ((HasBit(v->current_order.flags, OF_HALT_IN_DEPOT) && !HasBit(v->current_order.flags, OF_PART_OF_ORDERS) && v->current_order.type == OT_GOTO_DEPOT) ||
 
			(v->vehstatus & VS_STOPPED)) {
 
		/* we keep the vehicle in the depot since the user ordered it to stay */
 
		v->leave_depot_instantly = false;
 
	} else {
0 comments (0 inline, 0 general)