Changeset - r2600:a2ceb716bb8d
[Not reviewed]
master
0 1 0
bjarni - 18 years ago 2005-11-04 22:10:49
bjarni@openttd.org
(svn r3137) -Fix: [autoreplace] fixed assert that was triggerable when a vehicle entered a depot even though the goto depot was canceled
this assert could be reached by clicking on the goto depot button to cancel goto depot from the orders and the vehicle
still entered the depot. The flags in that case would not be "normal" anymore. An additional check is added to prevent this
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
vehicle.c
Show inline comments
 
@@ -527,7 +527,7 @@ 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, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
 
	if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT) && !HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS) && v->current_order.type == OT_GOTO_DEPOT) {
 
		// 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)