forked from mirror/OpenTTD
(svn r3111) -Fix: [autoreplace] [ 1341783 ] Assertion failure in vehicle.c line 378
running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks() This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
This commit is contained in:
@@ -414,8 +414,6 @@ static void ShipEnterDepot(Vehicle *v)
|
||||
|
||||
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
|
||||
|
||||
v = MaybeReplaceVehicle(v);
|
||||
|
||||
TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT);
|
||||
|
||||
if (v->current_order.type == OT_GOTO_DEPOT) {
|
||||
|
Reference in New Issue
Block a user