1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

Merge pull request #14726 from ZehMatt/fix-14724

Fix #14724: Money was ignored for ride creation
This commit is contained in:
Michael Steenbeek
2021-05-24 00:08:37 +02:00
committed by GitHub
4 changed files with 4 additions and 5 deletions

View File

@@ -310,8 +310,7 @@ namespace GameActions
if (result->Error == GameActions::Status::Ok)
{
if ((action->GetFlags() & GAME_COMMAND_FLAG_APPLY)
&& !finance_check_affordability(result->Cost, action->GetFlags()))
if (!finance_check_affordability(result->Cost, action->GetFlags()))
{
result->Error = GameActions::Status::InsufficientFunds;
result->ErrorTitle = STR_CANT_DO_THIS;

View File

@@ -75,7 +75,7 @@ bool finance_check_money_required(uint32_t flags)
*/
bool finance_check_affordability(money32 cost, uint32_t flags)
{
return cost <= 0 || !finance_check_money_required(flags) || cost <= gCash;
return !finance_check_money_required(flags) || cost <= 0 || cost <= gCash;
}
/**

View File

@@ -36,7 +36,7 @@
// This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "15"
#define NETWORK_STREAM_VERSION "16"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static Peep* _pickup_peep = nullptr;

View File

@@ -1586,7 +1586,7 @@ static bool track_design_place_ride(TrackDesign* td6, const CoordsXYZ& origin, R
}
else if (_trackDesignPlaceOperation == PTD_OPERATION_PLACE_QUERY)
{
flags = 0;
flags = GAME_COMMAND_FLAG_NO_SPEND;
}
if (_trackDesignPlaceIsReplay)
{