summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-30 09:46:40 +0000
committertruelight <truelight@openttd.org>2004-12-30 09:46:40 +0000
commit32c3fbd18ea40c46717aa6dfa35235aa5b66fe07 (patch)
treef4717e74c787a8bd7fab47b1b0e6986f4f32702f
parent635b854c29c79dd8f22de9edb20d75207b4eafdd (diff)
downloadopenttd-32c3fbd18ea40c46717aa6dfa35235aa5b66fe07.tar.xz
(svn r1300) -Fix: The cost for an autorenew was not always send to the right player ;)
-rw-r--r--vehicle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vehicle.c b/vehicle.c
index bb08f9e29..e029c985a 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1481,6 +1481,8 @@ void MaybeRenewVehicle(Vehicle *v)
if (!_patches.autorenew || v->age - v->max_age < (_patches.autorenew_months * 30))
return;
+ _current_player = v->owner;
+
/* Now renew the vehicle */
DoCommandP(v->tile, v->index, v->engine_type, NULL, CMD_RENEW_VEHICLE);
}