(svn r3093) -Fix: [autoreplace] fixed issue where the money limit message showed up in some cases when no replace was needed
authorbjarni
Thu, 27 Oct 2005 19:30:40 +0000
changeset 2558 64d44eaf39ee
parent 2557 5d91ce06a360
child 2559 fe757666278c
(svn r3093) -Fix: [autoreplace] fixed issue where the money limit message showed up in some cases when no replace was needed
vehicle.c
--- a/vehicle.c	Wed Oct 26 07:12:14 2005 +0000
+++ b/vehicle.c	Thu Oct 27 19:30:40 2005 +0000
@@ -1655,7 +1655,7 @@
 		} while (w->type == VEH_Train && (w=w->next) != NULL);
 
 		if (!(flags & DC_EXEC) && (CmdFailed(temp_cost) || p->money64 < (int32)(cost + p->engine_renew_money) || cost == 0)) {
-			if (p->money64 < (int32)(cost + p->engine_renew_money) && ( _local_player == v->owner )) {
+			if (p->money64 < (int32)(cost + p->engine_renew_money) && ( _local_player == v->owner ) && cost != 0) {
 				StringID message;
 				SetDParam(0, v->unitnumber);
 				switch (v->type) {