diff options
author | peter1138 <peter1138@openttd.org> | 2013-01-11 07:39:25 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2013-01-11 07:39:25 +0000 |
commit | c00a400cc7e7626a430ed65d29a47c02a7a14eaa (patch) | |
tree | 0936d13989bc82bcc8bf50026d2ba55f7afed7ee /src/economy.cpp | |
parent | 4ebbfc3de4a50b6cf73a7fe50dd17ac1e42efb92 (diff) | |
download | openttd-c00a400cc7e7626a430ed65d29a47c02a7a14eaa.tar.xz |
(svn r24905) -Feature(ish): Implement station randomisation triggers.
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 3cdb79321..d9229351d 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1535,6 +1535,7 @@ static void LoadUnloadVehicle(Vehicle *front, int *cargo_left) st->last_vehicle_type = v->type; if (ge->cargo.Empty()) { + TriggerStationRandomisation(st, st->xy, SRT_CARGO_TAKEN, v->cargo_type); TriggerStationAnimation(st, st->xy, SAT_CARGO_TAKEN, v->cargo_type); AirportAnimationTrigger(st, AAT_STATION_CARGO_TAKEN, v->cargo_type); } @@ -1552,7 +1553,10 @@ static void LoadUnloadVehicle(Vehicle *front, int *cargo_left) } if (anything_loaded || anything_unloaded) { - if (front->type == VEH_TRAIN) TriggerStationAnimation(st, front->tile, SAT_TRAIN_LOADS); + if (front->type == VEH_TRAIN) { + TriggerStationRandomisation(st, front->tile, SRT_TRAIN_LOADS); + TriggerStationAnimation(st, front->tile, SAT_TRAIN_LOADS); + } } /* Only set completely_emptied, if we just unloaded all remaining cargo */ |