summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-08-06 19:12:44 +0000
committerbjarni <bjarni@openttd.org>2005-08-06 19:12:44 +0000
commitb0f307365a85ff71b6086d8fc8708d95104579cf (patch)
tree88e5d45a91baef36639280ddcd11a503016ece04
parent03e860d06d21444377dda121a18e3f007e2d3116 (diff)
downloadopenttd-b0f307365a85ff71b6086d8fc8708d95104579cf.tar.xz
(svn r2820) -Fix: [autoreplace] fixed issue introduced in 2817 where autoreplace failed if new engine is cheaper than the old one (peter1138)
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 4c27eaa4d..2d09e8db7 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1442,7 +1442,7 @@ int32 ReplaceVehicle(Vehicle *v)
/* Check if there is money for the upgrade.. if not, give a nice news-item
(that is needed, because this CMD is called automaticly) */
- if ( p->money64 < (p->engine_renew_money + build_cost + rear_engine_cost - v->value)) {
+ if ( p->money64 < (int32)(p->engine_renew_money + build_cost + rear_engine_cost - v->value)) {
if (( _local_player == v->owner ) && ( v->unitnumber != 0 )) { //v->unitnumber = 0 for train cars
int message;
SetDParam(0, v->unitnumber);