align cover reduction for big target to the new higher resolution cover check

rohan
Sep 16, 2022, 8:03 AM
474V3NXSW5URKWATA7XTMR2JMN23WHOJUMI3KDJNSWMYBMSP3ERQC

Dependencies

  • [2] 6BFPFEMC correctly scale far cover for oversize targets
  • [3] ZC7RMRAE simpler no-line-of-sight which also accounts for existing cover, higher resolution far cover
  • [4] 6GNTEDE4 use real LOS functions to determine Far Cover (automatically accounts for roof edge protection)
  • [5] VHVL5HH4 simplify far cover by starting at only the peek tile
  • [6] UA2L2WYU use correct config file
  • [*] X4IR7ZAH baseline from krumiro's [WotC] RW Realistic Aiming Angles

Change contents

  • edit in RWRealisticAimingAnglesHL/Src/RWRealisticAimingAnglesHL/Classes/Override_X2AbilityToHitCalc_StandardAim.uc at line 817
    [3.2195][4.2730:2852](),[4.2730][4.2730:2852](),[4.2852][2.0:72]()
    }
    // Big things are easy to hit even if partially covered
    if (TargetState.UnitHeight > 2)
    {
    FarCover = Max(0, FarCover - (TargetState.UnitHeight - 2) * 2);
  • replacement in RWRealisticAimingAnglesHL/Src/RWRealisticAimingAnglesHL/Classes/Override_X2AbilityToHitCalc_StandardAim.uc at line 826
    [4.3552][4.3552:3593](),[4.3593][3.2304:2398]()
    // Scale far cover to high cover
    FarCoverBonus = FarCover * HIGH_COVER_BONUS / 14; // 14 is the maximum considered ray
    [4.3552]
    [4.3687]
    // 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;