Mercurial > hg > openttd
changeset 2589:52e17d2cafab draft
(svn r3126) Autoreplace: Only the first vehicle in a chain should be marked as entering a depot, so call moved out of DoVehicleTrigger loop.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Thu, 03 Nov 2005 18:27:29 +0000 |
parents | 62b5cb6aa71f |
children | 88b673c66b0f |
files | engine.c |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/engine.c +++ b/engine.c @@ -718,12 +718,6 @@ (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 @@ 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); }