summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-03-24 14:43:40 +0000
committertruelight <truelight@openttd.org>2005-03-24 14:43:40 +0000
commitfd77153960c91fd42785c867a75ba0b946773b9d (patch)
tree5312255691dcadede432d33c76158373fcd8e571
parent813e84bf9e2b9ac8e2e8d2b6854a7f618a7aec78 (diff)
downloadopenttd-fd77153960c91fd42785c867a75ba0b946773b9d.tar.xz
(svn r2044) -Fix: fix that TriggerVehicle is called from the wrong user
-rw-r--r--economy.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/economy.c b/economy.c
index 283bf3386..2d0f17b7b 100644
--- a/economy.c
+++ b/economy.c
@@ -1346,8 +1346,6 @@ int LoadUnloadVehicle(Vehicle *v)
assert(v->current_order.type == OT_LOADING);
v->cur_speed = 0;
- old_player = _current_player;
- _current_player = v->owner;
st = GetStation(last_visited = v->last_station_visited);
@@ -1455,6 +1453,9 @@ int LoadUnloadVehicle(Vehicle *v)
TriggerVehicle(v, VEHICLE_TRIGGER_EMPTY);
}
+ old_player = _current_player;
+ _current_player = v->owner;
+
if (result != 0) {
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);