diff options
author | peter1138 <peter1138@openttd.org> | 2006-01-06 22:49:00 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-01-06 22:49:00 +0000 |
commit | 79ce0def50f4d2c3e9956c9a5e7c93d893c1f465 (patch) | |
tree | 8a328a4db89773cf80d3659123e36782e8abe45e /engine.c | |
parent | 4cda74cb31953af0ff747430225199770c98a4ef (diff) | |
download | openttd-79ce0def50f4d2c3e9956c9a5e7c93d893c1f465.tar.xz |
(svn r3378) - NewGRF Fix: Use order status to determine whether a vehicle is loading instead
of speed, and get that state from first vehicle in a train consist.
Diffstat (limited to 'engine.c')
-rw-r--r-- | engine.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |