summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-09-01 18:35:36 +0000
committerbjarni <bjarni@openttd.org>2006-09-01 18:35:36 +0000
commit04745c2d66a739df44545f34c01fb9351d0c8b88 (patch)
tree2c9e67dcd5c3b81c49962da3ba4c197e3556126f
parentac8ab9ecf4b75dcb6c9991ee3b439ae591607a9f (diff)
downloadopenttd-04745c2d66a739df44545f34c01fb9351d0c8b88.tar.xz
(svn r6300) -Fix: FS#321 autoreplace / wagon removal
turned out to be a failure to run the wagon remoral code if the player didn't have enough money to do the replace after the replace took place the cost animation failed to show in this condition as well Now the test is not run anymore after the replace took place
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 8af90f895..fea6ce330 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1841,7 +1841,7 @@ static void MaybeReplaceVehicle(Vehicle *v)
}
} while (w->type == VEH_Train && (w = GetNextVehicle(w)) != NULL);
- if (p->money64 < (int32)(cost + p->engine_renew_money) || cost == 0) {
+ if (!(flags & DC_EXEC) && (p->money64 < (int32)(cost + p->engine_renew_money) || cost == 0)) {
if (p->money64 < (int32)(cost + p->engine_renew_money) && ( _local_player == v->owner ) && cost != 0) {
StringID message;
SetDParam(0, v->unitnumber);