From 6c4e2ae81b8520dadfd03545382f51910715a283 Mon Sep 17 00:00:00 2001 From: kagikn Date: Fri, 18 Aug 2017 14:42:20 +0900 Subject: [PATCH 1/2] Fix recieving awards after ejected from bike and riding again --- StuntBonusV/StuntBonusMonitor/SkiingBonus.cs | 6 +++--- StuntBonusV/StuntBonusMonitor/StoppieBonus.cs | 6 +++--- StuntBonusV/StuntBonusMonitor/WheelieBonus.cs | 6 +++--- StuntBonusV/StuntBonusV.csproj | 3 +++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/StuntBonusV/StuntBonusMonitor/SkiingBonus.cs b/StuntBonusV/StuntBonusMonitor/SkiingBonus.cs index 9320aa8..65721cd 100644 --- a/StuntBonusV/StuntBonusMonitor/SkiingBonus.cs +++ b/StuntBonusV/StuntBonusMonitor/SkiingBonus.cs @@ -59,19 +59,19 @@ internal void OnTick(object o, EventArgs e) if (!player.SafeExists()) { return; } var playerVeh = Game.Player.Character.CurrentVehicle; - if (playerVeh.SafeExists() && _currentVehicle != playerVeh) + if (playerVeh.SafeExists() && (!_currentVehicle.SafeExists() || _currentVehicle != playerVeh)) { _currentVehicle = playerVeh; _isPerformingSkiing = false; } - else if (!_currentVehicle.SafeExists()) + else if (!_currentVehicle.SafeExists() || !player.IsInVehicle(_currentVehicle)) { _currentVehicle = null; _isPerformingSkiing = false; return; } - if (_currentVehicle.SafeExists() && player.IsInVehicle(_currentVehicle)) + if (_currentVehicle.SafeExists()) { if (_currentVehicle.IsAlive && _currentVehicle.IsInSkiingStunt()) { diff --git a/StuntBonusV/StuntBonusMonitor/StoppieBonus.cs b/StuntBonusV/StuntBonusMonitor/StoppieBonus.cs index bd99bf8..8ee9c18 100644 --- a/StuntBonusV/StuntBonusMonitor/StoppieBonus.cs +++ b/StuntBonusV/StuntBonusMonitor/StoppieBonus.cs @@ -59,19 +59,19 @@ internal void OnTick(object o, EventArgs e) if (!player.SafeExists()) { return; } var playerVeh = Game.Player.Character.CurrentVehicle; - if (playerVeh.SafeExists() && _currentVehicle != playerVeh) + if (playerVeh.SafeExists() && (!_currentVehicle.SafeExists() || _currentVehicle != playerVeh)) { _currentVehicle = playerVeh; _isPerformingStoppie = false; } - else if (!_currentVehicle.SafeExists()) + else if (!_currentVehicle.SafeExists() || !player.IsInVehicle(_currentVehicle)) { _currentVehicle = null; _isPerformingStoppie = false; return; } - if (_currentVehicle.SafeExists() && player.IsInVehicle(_currentVehicle)) + if (_currentVehicle.SafeExists()) { if (_currentVehicle.IsAlive && _currentVehicle.IsInStoppie()) { diff --git a/StuntBonusV/StuntBonusMonitor/WheelieBonus.cs b/StuntBonusV/StuntBonusMonitor/WheelieBonus.cs index 34c232b..d40596c 100644 --- a/StuntBonusV/StuntBonusMonitor/WheelieBonus.cs +++ b/StuntBonusV/StuntBonusMonitor/WheelieBonus.cs @@ -60,19 +60,19 @@ internal void OnTick(object o, EventArgs e) if (!player.SafeExists()) { return; } var playerVeh = Game.Player.Character.CurrentVehicle; - if (playerVeh.SafeExists() && _currentVehicle != playerVeh) + if (playerVeh.SafeExists() && (!_currentVehicle.SafeExists() || _currentVehicle != playerVeh)) { _currentVehicle = playerVeh; _isPerformingWheelie = false; } - else if (!_currentVehicle.SafeExists()) + else if (!_currentVehicle.SafeExists() || !player.IsInVehicle(_currentVehicle)) { _currentVehicle = null; _isPerformingWheelie = false; return; } - if (_currentVehicle.SafeExists() && player.IsInVehicle(_currentVehicle)) + if (_currentVehicle.SafeExists()) { if (_currentVehicle.IsAlive && _currentVehicle.IsInWheelie()) { diff --git a/StuntBonusV/StuntBonusV.csproj b/StuntBonusV/StuntBonusV.csproj index 4184770..b147926 100644 --- a/StuntBonusV/StuntBonusV.csproj +++ b/StuntBonusV/StuntBonusV.csproj @@ -51,6 +51,9 @@ prompt MinimumRecommendedRules.ruleset + + false + .\ScriptHookVDotNet2.dll From b2af5d023bff5cf052185928c302a6c573690f87 Mon Sep 17 00:00:00 2001 From: kagikn Date: Fri, 18 Aug 2017 15:15:43 +0900 Subject: [PATCH 2/2] Fix not working LastStuntAward --- StuntBonusV/StuntBonusMonitor/UniqueStuntBonus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StuntBonusV/StuntBonusMonitor/UniqueStuntBonus.cs b/StuntBonusV/StuntBonusMonitor/UniqueStuntBonus.cs index 2661edd..fb2c15f 100644 --- a/StuntBonusV/StuntBonusMonitor/UniqueStuntBonus.cs +++ b/StuntBonusV/StuntBonusMonitor/UniqueStuntBonus.cs @@ -63,7 +63,7 @@ internal void OnTick(object o, EventArgs e) if (_completedUniqueStuntCount < currentCompletedStuntJumpCount) { var bonusMoney = BaseAward; - if (IsLastSpecialAwardEnabled && _completedUniqueStuntCount == 50) + if (IsLastSpecialAwardEnabled && currentCompletedStuntJumpCount == 50) { bonusMoney = LastStuntAward; }