(svn r22745) -Fix: [NewGRF] SAT_CARGO_TAKEN and AAT_STATION_CARGO_TAKEN shall only be triggered when all cargo was taken.

This commit is contained in:
frosch 2011-08-14 13:45:36 +00:00
parent 99a045d5f0
commit da0ee75a70
2 changed files with 5 additions and 3 deletions

View File

@ -1329,8 +1329,10 @@ static void LoadUnloadVehicle(Vehicle *front, int *cargo_left)
st->time_since_load = 0; st->time_since_load = 0;
st->last_vehicle_type = v->type; st->last_vehicle_type = v->type;
TriggerStationAnimation(st, st->xy, SAT_CARGO_TAKEN, v->cargo_type); if (ge->cargo.Empty()) {
AirportAnimationTrigger(st, AAT_STATION_CARGO_TAKEN, v->cargo_type); TriggerStationAnimation(st, st->xy, SAT_CARGO_TAKEN, v->cargo_type);
AirportAnimationTrigger(st, AAT_STATION_CARGO_TAKEN, v->cargo_type);
}
unloading_time += cap; unloading_time += cap;

View File

@ -28,7 +28,7 @@ struct AnimationInfo {
enum StationAnimationTrigger { enum StationAnimationTrigger {
SAT_BUILT, ///< Trigger tile when built. SAT_BUILT, ///< Trigger tile when built.
SAT_NEW_CARGO, ///< Trigger station on new cargo arrival. SAT_NEW_CARGO, ///< Trigger station on new cargo arrival.
SAT_CARGO_TAKEN, ///< Trigger station when cargo is taken. SAT_CARGO_TAKEN, ///< Trigger station when cargo is completely taken.
SAT_TRAIN_ARRIVES, ///< Trigger platform when train arrives. SAT_TRAIN_ARRIVES, ///< Trigger platform when train arrives.
SAT_TRAIN_DEPARTS, ///< Trigger platform when train leaves. SAT_TRAIN_DEPARTS, ///< Trigger platform when train leaves.
SAT_TRAIN_LOADS, ///< Trigger platform when train loads/unloads. SAT_TRAIN_LOADS, ///< Trigger platform when train loads/unloads.