From 3933e2ffc606eae16830248ca59fae4fb59d2a91 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 12 Jun 2019 22:20:00 +0200 Subject: [PATCH 1/2] Fix #9402: Ad campaigns disappear when you save and load the game --- distribution/changelog.txt | 1 + src/openrct2/rct2/S6Exporter.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index c6a1e6e4b5..4fc17781fb 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -55,6 +55,7 @@ - Fix: [#9240] Crash when passing directory instead of save file. - Fix: [#9293] Issue with the native load/save dialog. - Fix: [#9322] Peep crashing the game trying to find a ride to look at. +- Fix: [#9402] Ad campaigns disappear when you save and load the game. - Fix: Guests eating popcorn are drawn as if they're eating pizza. - Fix: The arbitrary ride type and vehicle dropdown lists are ordered case-sensitively. - Improved: [#6116] Expose colour scheme for track elements in the tile inspector. diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index a9e4a79cd2..1772a19fb2 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -794,7 +794,7 @@ void S6Exporter::ExportMarketingCampaigns() std::memset(_s6.campaign_ride_index, 0, sizeof(_s6.campaign_ride_index)); for (const auto& campaign : gMarketingCampaigns) { - _s6.campaign_weeks_left[campaign.Type] = campaign.WeeksLeft; + _s6.campaign_weeks_left[campaign.Type] = campaign.WeeksLeft | CAMPAIGN_ACTIVE_FLAG; if (campaign.Type == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign.Type == ADVERTISING_CAMPAIGN_RIDE) { _s6.campaign_ride_index[campaign.Type] = campaign.RideId; From 72c4baebda40c56f5147468be4e2e0721014e7c0 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 12 Jun 2019 22:31:16 +0200 Subject: [PATCH 2/2] Fix #9411: Ad campaigns end too soon --- distribution/changelog.txt | 1 + src/openrct2/actions/ParkMarketingAction.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 4fc17781fb..dfc0c60f14 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -56,6 +56,7 @@ - Fix: [#9293] Issue with the native load/save dialog. - Fix: [#9322] Peep crashing the game trying to find a ride to look at. - Fix: [#9402] Ad campaigns disappear when you save and load the game. +- Fix: [#9411] Ad campaigns end too soon. - Fix: Guests eating popcorn are drawn as if they're eating pizza. - Fix: The arbitrary ride type and vehicle dropdown lists are ordered case-sensitively. - Improved: [#6116] Expose colour scheme for track elements in the tile inspector. diff --git a/src/openrct2/actions/ParkMarketingAction.hpp b/src/openrct2/actions/ParkMarketingAction.hpp index 8de0b7e87f..607d0c1249 100644 --- a/src/openrct2/actions/ParkMarketingAction.hpp +++ b/src/openrct2/actions/ParkMarketingAction.hpp @@ -71,6 +71,7 @@ public: MarketingCampaign campaign{}; campaign.Type = _type; campaign.WeeksLeft = _numWeeks; + campaign.Flags = MarketingCampaignFlags::FIRST_WEEK; if (campaign.Type == ADVERTISING_CAMPAIGN_RIDE_FREE || campaign.Type == ADVERTISING_CAMPAIGN_RIDE) { campaign.RideId = _item;