B:BD[
3.55491] → [
4.2556:2632]
∅:D[
4.2632] → [
3.55589:55927]
B:BD[
3.55589] → [
3.55589:55927]
B:BD[
3.55927] → [
2.155:214]
∅:D[
2.214] → [
4.2633:2740]
B:BD[
3.55927] → [
4.2633:2740]
∅:D[
4.2740] → [
3.56267:56420]
B:BD[
3.56267] → [
3.56267:56420]
B:BD[
3.56420] → [
4.2741:2847]
∅:D[
4.2847] → [
3.57100:57102]
B:BD[
3.57100] → [
3.57100:57102]
B:BD[
3.57102] → [
4.2848:2987]
∅:D[
4.2987] → [
3.57102:57174]
B:BD[
3.57102] → [
3.57102:57174]
B:BD[
3.57174] → [
4.2988:3092]
∅:D[
4.3092] → [
3.57445:57505]
B:BD[
3.57445] → [
3.57445:57505]
B:BD[
3.57505] → [
4.3093:3308]
∅:D[
4.3308] → [
3.57801:58035]
B:BD[
3.57801] → [
3.57801:58035]
B:BD[
3.58373] → [
3.58373:58708]
B:BD[
3.58822] → [
3.58822:58988]
B:BD[
3.58988] → [
4.3309:3378]
∅:D[
5.73] → [
4.3378:3509]
B:BD[
4.3378] → [
4.3378:3509]
∅:D[
4.3964] → [
3.60518:60529]
B:BD[
3.60518] → [
3.60518:60529]
bShouldAddAngleToCoverBonus = (UnitState.GetTeam() == eTeam_XCom);
if (default.ApplyGoodAngleBonusNotOnlyForXComSoldiersButAlsoForAnyoneShooting) bShouldAddAngleToCoverBonus = true; //GOODANGLE FOR ENEMIES TOO!!!
// We have to avoid the weird visual situation of a unit standing behind low cover
// and that low cover extends at least 1 tile in the direction of the attacker.
// FIXME this can be covered by far cover instead
if((true && VisInfo.TargetCover == CT_MidLevel) || (false && VisInfo.TargetCover == CT_Standing))
{
UnitState.GetKeystoneVisibilityLocation(UnitTileLocation);
TargetState.GetKeystoneVisibilityLocation(TargetTileLocation);
NextTileOverCoverType = NextTileOverCoverInSameDirection(UnitTileLocation, TargetTileLocation);
if(true && VisInfo.TargetCover == CT_MidLevel && (NextTileOverCoverType == CT_MidLevel || NextTileOverCoverType == CT_Standing))
{
bShouldAddAngleToCoverBonus = false;
}
else if(false && VisInfo.TargetCover == CT_Standing && NextTileOverCoverType == CT_Standing )
{
bShouldAddAngleToCoverBonus = false;
Alpha = FClamp((VisInfo.TargetCoverAngle - MIN_ANGLE_TO_COVER) / (MAX_ANGLE_TO_COVER - MIN_ANGLE_TO_COVER), 0.0, 1.0);
AngleToCoverModifier = Lerp(MAX_ANGLE_PENALTY, MIN_ANGLE_PENALTY, Alpha);
AddModifier(Round(-1.0 * AngleToCoverModifier), class'XLocalizedData'.default.BadAngleToTargetCover, m_ShotBreakdown, eHit_Success, bDebugLog);
}
}
if( bShouldAddAngleToCoverBonus )
{
Alpha = FClamp((VisInfo.TargetCoverAngle - default.MaximumGoodAngleBonusEndsAtThisHorizontalAngleBetweenLineOfFireAndCoverSurface) / (default.MinimumGoodAngleBonusStartsAtThisHorizontalAngleBetweenLineOfFireAndCoverSurface - default.MaximumGoodAngleBonusEndsAtThisHorizontalAngleBetweenLineOfFireAndCoverSurface), 0.0, 1.0);
AngleToCoverModifier = Lerp(default.MaximumGoodAngleBonusCoverReductionPercentage /100, default.MinimumGoodAngleBonusCoverReductionPercentage /100, Alpha);
GoodAngleBonus = Round(CoverValue * AngleToCoverModifier);
`log("GoodAngleBonus:"@GoodAngleBonus, true, 'XCom_HitRolls');
AddModifier(GoodAngleBonus, class'XLocalizedData'.default.AngleToTargetCover, m_ShotBreakdown, eHit_Success, bDebugLog);
}
Alpha = FClamp((VisInfo.TargetCoverAngle - default.MaximumGoodAngleBonusEndsAtThisHorizontalAngleBetweenLineOfFireAndCoverSurface) / (default.MinimumGoodAngleBonusStartsAtThisHorizontalAngleBetweenLineOfFireAndCoverSurface - default.MaximumGoodAngleBonusEndsAtThisHorizontalAngleBetweenLineOfFireAndCoverSurface), 0.0, 1.0);
AngleToCoverModifier = Lerp(default.MaximumGoodAngleBonusCoverReductionPercentage /100, default.MinimumGoodAngleBonusCoverReductionPercentage /100, Alpha);
GoodAngleBonus = Round(CoverValue * AngleToCoverModifier);
`log("GoodAngleBonus:"@GoodAngleBonus, true, 'XCom_HitRolls');
AddModifier(GoodAngleBonus, class'XLocalizedData'.default.AngleToTargetCover, m_ShotBreakdown, eHit_Success, bDebugLog);