mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 09:29:10 +00:00
(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:
@@ -3328,8 +3328,6 @@ void TrainEnterDepot(Vehicle *v, TileIndex tile)
|
||||
v->load_unload_time_rem = 0;
|
||||
v->cur_speed = 0;
|
||||
|
||||
v = MaybeReplaceVehicle(v);
|
||||
|
||||
TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT);
|
||||
|
||||
if (v->current_order.type == OT_GOTO_DEPOT) {
|
||||
|
Reference in New Issue
Block a user