changeset 2592:7c96f6729366 draft

(svn r3129) -Fix: [autoreplace] fixed bug that made the player pay twice for autoreplacing and could end up with negative money this is not the same bug as in rev 3128, which means you actually paid 3 times. Now it pays correctly
author bjarni <bjarni@openttd.org>
date Thu, 03 Nov 2005 21:22:38 +0000
parents f2548a355c1e
children 4ca056dac343
files vehicle.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vehicle.c
+++ b/vehicle.c
@@ -1681,6 +1681,7 @@
 			}
 			if (stopped)
 				v->vehstatus &= ~VS_STOPPED; //we start the vehicle again
+			_current_player = OWNER_NONE;
 			return;
 		}
 
@@ -1691,8 +1692,6 @@
 		flags |= DC_EXEC;
 	}
 
-	SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
-	SubtractMoneyFromPlayer(cost);
 	if (IsLocalPlayer()) ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, cost);
 
 	if (stopped)