this.damages[firingArcToHitArc(arc)][r] += ed; if (arc != Compute.ARC_REAR && arc != Compute.ARC_360) { damages[ToHitData.SIDE_FRONT][r] += ed; if (secondary) { damages[TT][r] += ed;
if (arc == Compute.ARC_360 | arc == Compute.ARC_MAINGUN) { for (int i = FIRST_ARC; i <= LAST_ARC; i++){ damages[i][r] += ed; } } else {  if (secondary){  if (arc == Compute.ARC_FORWARD){ damages[Compute.ARC_FORWARD][r] += ed; damages[Compute.ARC_LEFTARM][r] += ed; damages[Compute.ARC_RIGHTARM][r] += ed; }    if (arc == Compute.ARC_LEFTARM | arc == Compute.ARC_LEFTSIDE){ damages[Compute.ARC_FORWARD][r] += ed; damages[Compute.ARC_LEFTARM][r] += ed; damages[Compute.ARC_REAR][r] += this.entity.canFlipArms() ? ed : (0.5 * ed); } if (arc == Compute.ARC_RIGHTARM | arc == Compute.ARC_RIGHTSIDE){ damages[Compute.ARC_FORWARD][r] += ed; damages[Compute.ARC_RIGHTARM][r] += ed; damages[Compute.ARC_REAR][r] += this.entity.canFlipArms() ? ed : (0.5 * ed); } if (arc == Compute.ARC_REAR){ damages[Compute.ARC_REAR][r] += ed; damages[Compute.ARC_LEFTARM][r] += ed; damages[Compute.ARC_RIGHTARM][r] += ed; }  } else { if (arc == Compute.ARC_FORWARD){ damages[Compute.ARC_FORWARD][r] += ed; } if (arc == Compute.ARC_LEFTARM | arc == Compute.ARC_LEFTSIDE){ damages[Compute.ARC_FORWARD][r] += ed; damages[Compute.ARC_LEFTARM][r] += ed; } if (arc == Compute.ARC_RIGHTARM | arc == Compute.ARC_RIGHTSIDE){ damages[Compute.ARC_FORWARD][r] += ed; damages[Compute.ARC_RIGHTARM][r] += ed; } if (arc == Compute.ARC_REAR){ damages[Compute.ARC_REAR][r] += ed; }
    private void addDamage(int arc, boolean secondary, int r, double ed) {        this.damages[firingArcToHitArc(arc)][r] += ed;        if (arc != Compute.ARC_REAR && arc != Compute.ARC_360) {            damages[ToHitData.SIDE_FRONT][r] += ed;            if (secondary) {                damages[TT][r] += ed;            }        }        if (arc == Compute.ARC_360) {            for (int i = FIRST_ARC; i <= LAST_ARC; i++)                damages[i][r] += ed;        }    }