XCOM Squadsight Aim Penalty XGAbility Targeted GetUIHitChance Hex Changes
Overview
This contains the hex changes to the function XGAbility_Targeted.GetUIHitChance in XComGame.upk. This change supports the additional of an aim penalty when using Squadsight.
Hex Change
original: | 06 D8 01 07 B0 01 1B 9A 36 00 00 00 00 00 00 24 24 16 0F 48 B7 7C 00 00 1B A6 32 00 00 00 00 00 00 16 0F 48 B6 7C 00 00 25 06 D8 01 0F 48 B7 7C 00 00 1B A6 32 00 00 00 00 00 00 16 0F 48 B6 7C 00 00 1B D9 31 00 00 00 00 00 00 16 |
new: | 06 D8 01 0F 48 B7 7C 00 00 1B 9B 02 00 00 00 00 00 00 1B A6 32 00 00 00 00 00 00 16 16 07 BA 01 1B 9A 36 00 00 00 00 00 00 24 24 16 0F 48 B6 7C 00 00 25 06 D8 01 0F 48 B6 7C 00 00 1B D9 31 00 00 00 00 00 00 16 0B 00 B5 7C 00 00 |
Decompiled Code
Original Code
if(m_kShot.HasProperty(36)) { iUIHitChance = m_kShot.GetHitChance(); iUICriticalChance = 0; } else { iUIHitChance = m_kShot.GetHitChance(); iUICriticalChance = m_kShot.GetCriticalChance(); }
New Code
iUIHitChance = m_kShot.AdjustToHit(m_kShot.GetHitChance()); if(m_kShot.HasProperty(36)) { iUICriticalChance = 0; } else { iUICriticalChance = m_kShot.GetCriticalChance(); }
References
Referred to by this article:
That refer to this article:
- <none>