Skip to content

Commit

Permalink
Merge pull request #5062 from SJuliez/heat-efficiency-bv
Browse files Browse the repository at this point in the history
BV calculation: halve BV for the first weapon if heat efficiency is 0
  • Loading branch information
neoancient authored Jan 16, 2024
2 parents e03ab0f + 7a1a511 commit 43831d7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,13 @@ protected void processWeapons() {
}

weaponRecords.sort(heatSorter);
boolean exceededEfficiency = false;
int heatEfficiency = heatEfficiency();
heatEfficiencyExceeded = heatEfficiency <= 0;

for (WeaponBvHeatRecord weaponRecord : weaponRecords) {
heatSum += weaponRecord.heat;
processWeapon(weaponRecord.weapon, true, true);
if ((!exceededEfficiency) && (heatSum >= heatEfficiency)) {
exceededEfficiency = true;
if (heatSum >= heatEfficiency) {
heatEfficiencyExceeded = true;
}
}
Expand Down

0 comments on commit 43831d7

Please sign in to comment.