Changeset - r2592:3d6e3a47e95b
[Not reviewed]
master
0 1 0
bjarni - 18 years ago 2005-11-03 21:22:38
bjarni@openttd.org
(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
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
vehicle.c
Show inline comments
 
@@ -1681,6 +1681,7 @@ static void MaybeReplaceVehicle(Vehicle 
 
			}
 
			if (stopped)
 
				v->vehstatus &= ~VS_STOPPED; //we start the vehicle again
 
			_current_player = OWNER_NONE;
 
			return;
 
		}
 

	
 
@@ -1691,8 +1692,6 @@ static void MaybeReplaceVehicle(Vehicle 
 
		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)
0 comments (0 inline, 0 general)