diff options
author | peter1138 <peter1138@openttd.org> | 2006-10-01 17:56:38 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-10-01 17:56:38 +0000 |
commit | 33e8c26c38ac228a22868a27687e0a92d1ec9a29 (patch) | |
tree | 57eb0a57cbb2b1d07cc281291ecbcb85c71b9116 /economy.c | |
parent | 7c8bba7b6851ec6070416290aa428ad96b3fcf6e (diff) | |
download | openttd-33e8c26c38ac228a22868a27687e0a92d1ec9a29.tar.xz |
(svn r6611) - Newsounds:
- If the NewGRF sound effect chosen doesn't exist, then ignore it.
- Play load/unload sound if provided.
Diffstat (limited to 'economy.c')
-rw-r--r-- | economy.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -28,6 +28,7 @@ #include "ai/ai.h" #include "train.h" #include "newgrf_engine.h" +#include "newgrf_sound.h" #include "unmovable.h" #include "date.h" @@ -1464,7 +1465,9 @@ int LoadUnloadVehicle(Vehicle *v) v->profit_this_year += profit; SubtractMoneyFromPlayer(-profit); - if (IsLocalPlayer()) SndPlayVehicleFx(SND_14_CASHTILL, v); + if (IsLocalPlayer() && !PlayVehicleSound(v, VSE_LOAD_UNLOAD)) { + SndPlayVehicleFx(SND_14_CASHTILL, v); + } ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, -profit); } |