summaryrefslogtreecommitdiff
path: root/engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'engine.c')
-rw-r--r--engine.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/engine.c b/engine.c
index 20da2c32d..a2e717f1e 100644
--- a/engine.c
+++ b/engine.c
@@ -608,7 +608,12 @@ int GetCustomEngineSprite(EngineID engine, const Vehicle *v, byte direction)
if (capacity == 0) capacity = 1;
loaded = (v->cargo_count * 100) / capacity;
- in_motion = (v->cur_speed != 0);
+
+ if (v->type == VEH_Train) {
+ in_motion = GetFirstVehicleInChain(v)->current_order.type != OT_LOADING;
+ } else {
+ in_motion = v->current_order.type != OT_LOADING;
+ }
}
group = GetVehicleSpriteGroup(engine, v);