mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-24 08:01:33 +00:00
(svn r3126) Autoreplace: Only the first vehicle in a chain should be marked as entering a depot, so call moved out of DoVehicleTrigger loop.
This commit is contained in:
parent
7c40462d24
commit
01b6109751
11
engine.c
11
engine.c
@ -718,12 +718,6 @@ static void DoTriggerVehicle(Vehicle *veh, VehicleTrigger trigger, byte base_ran
|
||||
(resolve_callback) TriggerVehicleSpriteGroup);
|
||||
}
|
||||
|
||||
if (trigger == VEHICLE_TRIGGER_DEPOT) {
|
||||
// store that the vehicle entered a depot this tick
|
||||
// it needs to be before all possible return statements;
|
||||
VehicleEnteredDepotThisTick(veh);
|
||||
}
|
||||
|
||||
if (group == NULL)
|
||||
return;
|
||||
|
||||
@ -773,6 +767,11 @@ static void DoTriggerVehicle(Vehicle *veh, VehicleTrigger trigger, byte base_ran
|
||||
|
||||
void TriggerVehicle(Vehicle *veh, VehicleTrigger trigger)
|
||||
{
|
||||
if (trigger == VEHICLE_TRIGGER_DEPOT) {
|
||||
// store that the vehicle entered a depot this tick
|
||||
VehicleEnteredDepotThisTick(veh);
|
||||
}
|
||||
|
||||
DoTriggerVehicle(veh, trigger, 0, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user