Skip to content

Commit

Permalink
clear calcDmgPerHitReport once it is added to vPhaseReport
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronekochomusuke committed Jul 19, 2023
1 parent 2513dd4 commit 68a934e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions megamek/src/megamek/common/weapons/ACAPHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ protected void handleEntityDamage(Entity entityTarget, Vector<Report> vPhaseRepo
// Report calcDmgPerHitReports here
if (!calcDmgPerHitReport.isEmpty()) {
vPhaseReport.addAll(calcDmgPerHitReport);
calcDmgPerHitReport.clear();
}

// if the target was in partial cover, then we already handled
Expand Down
1 change: 1 addition & 0 deletions megamek/src/megamek/common/weapons/MGAWeaponHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ protected void handleEntityDamage(Entity entityTarget,
// Report calcDmgPerHitReports here
if (!calcDmgPerHitReport.isEmpty()) {
vPhaseReport.addAll(calcDmgPerHitReport);
calcDmgPerHitReport.clear();
}

// if the target was in partial cover, then we already handled
Expand Down
1 change: 1 addition & 0 deletions megamek/src/megamek/common/weapons/RifleWeaponHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ protected void handleEntityDamage(Entity entityTarget,
// Report calcDmgPerHitReports here
if (!calcDmgPerHitReport.isEmpty()) {
vPhaseReport.addAll(calcDmgPerHitReport);
calcDmgPerHitReport.clear();
}

// if the target was in partial cover, then we already handled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ protected void handleEntityDamage(Entity entityTarget,
// Report calcDmgPerHitReports here
if (!calcDmgPerHitReport.isEmpty()) {
vPhaseReport.addAll(calcDmgPerHitReport);
calcDmgPerHitReport.clear();
}

// if the target was in partial cover, then we already handled
Expand Down
1 change: 1 addition & 0 deletions megamek/src/megamek/common/weapons/WeaponHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,7 @@ protected void handleEntityDamage(Entity entityTarget,
// Report calcDmgPerHitReports here
if (!calcDmgPerHitReport.isEmpty()) {
vPhaseReport.addAll(calcDmgPerHitReport);
calcDmgPerHitReport.clear();
}

// if the target was in partial cover, then we already handled
Expand Down

0 comments on commit 68a934e

Please sign in to comment.