summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-08-14 13:45:36 +0000
committerfrosch <frosch@openttd.org>2011-08-14 13:45:36 +0000
commitda0ee75a7081b2ca30a6fd6678ad52918fee1e8e (patch)
treed93e365122eaa04e48a2742595be30e9eee41285 /src
parent99a045d5f0d98bdd69791d4236599a04643d2685 (diff)
downloadopenttd-da0ee75a7081b2ca30a6fd6678ad52918fee1e8e.tar.xz
(svn r22745) -Fix: [NewGRF] SAT_CARGO_TAKEN and AAT_STATION_CARGO_TAKEN shall only be triggered when all cargo was taken.
Diffstat (limited to 'src')
-rw-r--r--src/economy.cpp6
-rw-r--r--src/newgrf_animation_type.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index ae1db1845..15e136bf7 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1329,8 +1329,10 @@ static void LoadUnloadVehicle(Vehicle *front, int *cargo_left)
st->time_since_load = 0;
st->last_vehicle_type = v->type;
- TriggerStationAnimation(st, st->xy, SAT_CARGO_TAKEN, v->cargo_type);
- AirportAnimationTrigger(st, AAT_STATION_CARGO_TAKEN, v->cargo_type);
+ if (ge->cargo.Empty()) {
+ TriggerStationAnimation(st, st->xy, SAT_CARGO_TAKEN, v->cargo_type);
+ AirportAnimationTrigger(st, AAT_STATION_CARGO_TAKEN, v->cargo_type);
+ }
unloading_time += cap;
diff --git a/src/newgrf_animation_type.h b/src/newgrf_animation_type.h
index 660cec990..1f3995f46 100644
--- a/src/newgrf_animation_type.h
+++ b/src/newgrf_animation_type.h
@@ -28,7 +28,7 @@ struct AnimationInfo {
enum StationAnimationTrigger {
SAT_BUILT, ///< Trigger tile when built.
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_DEPARTS, ///< Trigger platform when train leaves.
SAT_TRAIN_LOADS, ///< Trigger platform when train loads/unloads.