Mercurial > hg > openttd
changeset 2600:ee21e4aa0ae3 draft
(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
author | bjarni <bjarni@openttd.org> |
---|---|
date | Fri, 04 Nov 2005 22:10:49 +0000 |
parents | ca61c2fcc73b |
children | d995ef36dbf5 |
files | vehicle.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vehicle.c +++ b/vehicle.c @@ -527,7 +527,7 @@ 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 {