summaryrefslogtreecommitdiff
path: root/economy.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-09-14 18:03:38 +0000
committerDarkvater <darkvater@openttd.org>2005-09-14 18:03:38 +0000
commit2131f68ae2c65799f2ce82ee84c7022264efa469 (patch)
tree1c4620d5f83933db927ef94bd8a085442eaca0c1 /economy.c
parent1bf06d7da4043d007d8a174b2187153bc818bf83 (diff)
downloadopenttd-2131f68ae2c65799f2ce82ee84c7022264efa469.tar.xz
(svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
- Add IsLocalPlayer() which substitutes _local_player == _current_player
Diffstat (limited to 'economy.c')
-rw-r--r--economy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/economy.c b/economy.c
index 97e7ae9a3..3f4788b3b 100644
--- a/economy.c
+++ b/economy.c
@@ -1472,8 +1472,7 @@ int LoadUnloadVehicle(Vehicle *v)
v->profit_this_year += profit;
SubtractMoneyFromPlayer(-profit);
- if (_current_player == _local_player)
- SndPlayVehicleFx(SND_14_CASHTILL, v);
+ if (IsLocalPlayer()) SndPlayVehicleFx(SND_14_CASHTILL, v);
ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, -profit);
}