mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-19 15:25:39 +00:00
(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
This commit is contained in:
parent
6af8bd605e
commit
e40dea16e9
@ -1681,6 +1681,7 @@ static void MaybeReplaceVehicle(Vehicle *v)
|
|||||||
}
|
}
|
||||||
if (stopped)
|
if (stopped)
|
||||||
v->vehstatus &= ~VS_STOPPED; //we start the vehicle again
|
v->vehstatus &= ~VS_STOPPED; //we start the vehicle again
|
||||||
|
_current_player = OWNER_NONE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1691,8 +1692,6 @@ static void MaybeReplaceVehicle(Vehicle *v)
|
|||||||
flags |= DC_EXEC;
|
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 (IsLocalPlayer()) ShowCostOrIncomeAnimation(v->x_pos, v->y_pos, v->z_pos, cost);
|
||||||
|
|
||||||
if (stopped)
|
if (stopped)
|
||||||
|
Loading…
Reference in New Issue
Block a user