engine.c
changeset 2830 655a34aef536
parent 2817 cdf488223c23
child 2848 8f57563f8ddf
equal deleted inserted replaced
2829:fd54aa44d6e0 2830:655a34aef536
   606 		cargo = _global_cargo_id[_opt.landscape][v->cargo_type];
   606 		cargo = _global_cargo_id[_opt.landscape][v->cargo_type];
   607 		assert(cargo != GC_INVALID);
   607 		assert(cargo != GC_INVALID);
   608 
   608 
   609 		if (capacity == 0) capacity = 1;
   609 		if (capacity == 0) capacity = 1;
   610 		loaded = (v->cargo_count * 100) / capacity;
   610 		loaded = (v->cargo_count * 100) / capacity;
   611 		in_motion = (v->cur_speed != 0);
   611 
       
   612 		if (v->type == VEH_Train) {
       
   613 			in_motion = GetFirstVehicleInChain(v)->current_order.type != OT_LOADING;
       
   614 		} else {
       
   615 			in_motion = v->current_order.type != OT_LOADING;
       
   616 		}
   612 	}
   617 	}
   613 
   618 
   614 	group = GetVehicleSpriteGroup(engine, v);
   619 	group = GetVehicleSpriteGroup(engine, v);
   615 	group = ResolveVehicleSpriteGroup(group, v, 0, (resolve_callback) ResolveVehicleSpriteGroup);
   620 	group = ResolveVehicleSpriteGroup(group, v, 0, (resolve_callback) ResolveVehicleSpriteGroup);
   616 
   621