Fix: VF_LOADING_FINISHED and VF_STOP_LOADING flags tested on wrong vehicle part. (#13063)

These flags are only set on the front part of a vehicle as they apply to the whole consist.
This commit is contained in:
Peter Nelson 2024-11-07 00:25:05 +00:00 committed by GitHub
parent 884b93c4c0
commit d54341318e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1515,7 +1515,7 @@ uint8_t CalcPercentVehicleFilled(const Vehicle *front, StringID *colour)
unloading += HasBit(v->vehicle_flags, VF_CARGO_UNLOADING) ? 1 : 0;
loading |= !order_no_load &&
(order_full_load || st->goods[v->cargo_type].HasRating()) &&
!HasBit(v->vehicle_flags, VF_LOADING_FINISHED) && !HasBit(v->vehicle_flags, VF_STOP_LOADING);
!HasBit(front->vehicle_flags, VF_LOADING_FINISHED) && !HasBit(front->vehicle_flags, VF_STOP_LOADING);
cars++;
}
}