474V3NXSW5URKWATA7XTMR2JMN23WHOJUMI3KDJNSWMYBMSP3ERQC
// Scale far cover to high cover
FarCoverBonus = FarCover * HIGH_COVER_BONUS / 14; // 14 is the maximum considered ray
// Big things are easy to hit even if partially covered
if (TargetState.UnitHeight > 2)
{
`log("FarCover base:"@FarCover, true, 'XCom_HitRolls');
FarCover = Max(0, FarCover - (TargetState.UnitHeight - 2) * 8);
`log("FarCover after big target factor:"@FarCover, true, 'XCom_HitRolls');
}
// Scale far cover to high cover against possible tile blocks for a human sized target
FarCoverBonus = FarCover * HIGH_COVER_BONUS / 14;