Skip to content

Commit 817a942

Browse files
committed
- Replaced getAdjustedEdge with getCurrentEdge for drivers and gunners to account for prior Edge usage.
1 parent 95c75e3 commit 817a942

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

MekHQ/src/mekhq/campaign/unit/Unit.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4829,19 +4829,19 @@ public void resetPilotAndEntity() {
48294829
if (getCampaign().getCampaignOptions().isUseEdge()) {
48304830
double sumEdge = 0;
48314831
for (Person p : drivers) {
4832-
sumEdge += p.getAdjustedEdge();
4832+
sumEdge += p.getCurrentEdge();
48334833
}
48344834
// Again, don't count infantrymen twice
48354835
if (!entity.hasETypeFlag(Entity.ETYPE_INFANTRY)) {
48364836
for (Person p : gunners) {
4837-
sumEdge += p.getAdjustedEdge();
4837+
sumEdge += p.getCurrentEdge();
48384838
}
48394839
}
48404840
// Average the edge values of pilots and gunners. The Spacecraft Engineer
48414841
// (vessel crewmembers)
48424842
// handle edge solely through MHQ as noncombat personnel, so aren't considered
48434843
// here
4844-
int edge = max(0, (int) Math.round(sumEdge / crewSize));
4844+
int edge = (int) Math.round(sumEdge / crewSize);
48454845
IOption edgeOption = entity.getCrew().getOptions().getOption(OptionsConstants.EDGE);
48464846
edgeOption.setValue((Integer) edge);
48474847
}

0 commit comments

Comments
 (0)