From 342da566788474e62436e280a1444f3b156c8e79 Mon Sep 17 00:00:00 2001 From: TAHuntling <38479763+TAHuntling@users.noreply.github.com> Date: Fri, 21 Jul 2023 19:37:31 -0500 Subject: [PATCH] Added Player Rewards for Solo Racing (#1150) * Added Player Rewards for Solo Racing * Fixed Dual PlayersRating multiplication * Checking for solo player fixed * Another change to fix issues --- dGame/dComponents/RacingControlComponent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dGame/dComponents/RacingControlComponent.cpp b/dGame/dComponents/RacingControlComponent.cpp index d669049..d3fb709 100644 --- a/dGame/dComponents/RacingControlComponent.cpp +++ b/dGame/dComponents/RacingControlComponent.cpp @@ -374,8 +374,12 @@ void RacingControlComponent::HandleMessageBoxResponse(Entity* player, int32_t bu data->collectedRewards = true; // Calculate the score, different loot depending on player count - const auto score = m_LoadedPlayers * 10 + data->finished; + auto playersRating = m_LoadedPlayers; + if(m_LoadedPlayers == 1 && m_SoloRacing) { + playersRating *= 2; + } + const auto score = playersRating * 10 + data->finished; LootGenerator::Instance().GiveActivityLoot(player, m_Parent, m_ActivityID, score); // Giving rewards