From ea371144e7a9167fd290a95e90412dcf586eb720 Mon Sep 17 00:00:00 2001 From: Andy Ford Date: Thu, 14 Jun 2018 12:17:09 +0100 Subject: [PATCH] Fix #7643: No Money scenarios can have funding set to zero If research funding is set to no funding and scenario money is turned off, then update research at the normal rate. --- distribution/changelog.txt | 1 + src/openrct2/management/Research.cpp | 10 +++++++++- src/openrct2/network/Network.cpp | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 3d53715b4e..9f65318629 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,6 +1,7 @@ 0.2.0+ (in development) ------------------------------------------------------------------------ - Feature: [#6998] Guests now wait for passing vehicles before crossing railway tracks. +- Fix: [#7643] No Money scenarios with funding set to zero. - Fix: [#7653] Finances money spinner is too narrow for big loans. - Fix: [#7673] Vehicle names are cut off in invention list. - Fix: [#7674] Rides show up as random numbers in guest's ride list. diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index 265befc8f6..2ae1c07393 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -32,6 +32,7 @@ #include "../ride/RideData.h" #include "../ride/RideGroupManager.h" #include "../ride/TrackData.h" +#include "../world/Park.h" #include "../world/Scenery.h" #include "NewsItem.h" #include "Finance.h" @@ -342,7 +343,14 @@ void research_update() return; } - researchLevel = gResearchFundingLevel; + if ((gParkFlags & PARK_FLAGS_NO_MONEY) && gResearchFundingLevel == RESEARCH_FUNDING_NONE) + { + researchLevel = RESEARCH_FUNDING_NORMAL; + } + else + { + researchLevel = gResearchFundingLevel; + } currentResearchProgress = gResearchProgress; currentResearchProgress += _researchRate[researchLevel]; diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index cb2604391b..72670bb26f 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -34,7 +34,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 "2" +#define NETWORK_STREAM_VERSION "3" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static rct_peep* _pickup_peep = nullptr;