From 9272bc7144f80e9b33fb0a3fcdc191fd92c9d522 Mon Sep 17 00:00:00 2001 From: SuicidalInsanity Date: Sun, 30 Dec 2018 11:18:06 -0800 Subject: [PATCH 1/3] Fix for ripple fire My initial change to permit accurate weapon group weapon rpm count forgot to also change the timeDelayPerGun calc, resulting in the time delay now grabbing the square of total rpm, which causes Barrage to be essentially identical to Salvo, rather than correctly ripple firing linked weapons. --- BDArmory/Modules/MissileFire.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BDArmory/Modules/MissileFire.cs b/BDArmory/Modules/MissileFire.cs index 9607e050..aefa3331 100644 --- a/BDArmory/Modules/MissileFire.cs +++ b/BDArmory/Modules/MissileFire.cs @@ -2311,8 +2311,7 @@ private void PrepareWeapons() gunRippleRpm = counter; //number of seconds between each gun firing; will reduce with increasing RPM or number of guns - float timeDelayPerGun = 60f / (weaponRpm * counter); - + float timeDelayPerGun = 60f / gunRippleRpm; // rpm*counter will return the square of rpm now // Now lets act on the filtered list. List.Enumerator weapon = rippleWeapons.GetEnumerator(); while (weapon.MoveNext()) From 0f369e147018be599ebd6e0566827fa94163f77c Mon Sep 17 00:00:00 2001 From: SuicidalInsanity Date: Sun, 6 Jan 2019 20:23:10 -0800 Subject: [PATCH 2/3] final fix to ripple code Also forgot to readdrippleWeapons.Add --- BDArmory/Modules/MissileFire.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/BDArmory/Modules/MissileFire.cs b/BDArmory/Modules/MissileFire.cs index aefa3331..b77b0575 100644 --- a/BDArmory/Modules/MissileFire.cs +++ b/BDArmory/Modules/MissileFire.cs @@ -2305,6 +2305,7 @@ private void PrepareWeapons() if (weapCnt.Current == null) continue; if (selectedWeapon.GetShortName() != weapCnt.Current.GetShortName()) continue; weaponRpm = weapCnt.Current.roundsPerMinute; + rippleWeapons.Add(weapCnt.Current); counter += weaponRpm; // grab sum of weapons rpm } weapCnt.Dispose(); From f9b55935aa481920d4e4c1a674e3eb635012b37f Mon Sep 17 00:00:00 2001 From: Gedas-S Date: Wed, 23 Jan 2019 21:46:54 +0200 Subject: [PATCH 3/3] Revert "Fix for ripple fire" --- BDArmory/Modules/MissileFire.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BDArmory/Modules/MissileFire.cs b/BDArmory/Modules/MissileFire.cs index b77b0575..9607e050 100644 --- a/BDArmory/Modules/MissileFire.cs +++ b/BDArmory/Modules/MissileFire.cs @@ -2305,14 +2305,14 @@ private void PrepareWeapons() if (weapCnt.Current == null) continue; if (selectedWeapon.GetShortName() != weapCnt.Current.GetShortName()) continue; weaponRpm = weapCnt.Current.roundsPerMinute; - rippleWeapons.Add(weapCnt.Current); counter += weaponRpm; // grab sum of weapons rpm } weapCnt.Dispose(); gunRippleRpm = counter; //number of seconds between each gun firing; will reduce with increasing RPM or number of guns - float timeDelayPerGun = 60f / gunRippleRpm; // rpm*counter will return the square of rpm now + float timeDelayPerGun = 60f / (weaponRpm * counter); + // Now lets act on the filtered list. List.Enumerator weapon = rippleWeapons.GetEnumerator(); while (weapon.MoveNext())