DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ IsWeaponObstructionBlockingADS()

override bool ManBase::IsWeaponObstructionBlockingADS ( )
inlineprotected

См. определение в файле PlayerBase.c строка 8713

8714 {
8715 Weapon_Base weapon = Weapon_Base.Cast(GetItemInHands());
8716 if (!weapon)
8717 return false;
8718
8719 // Recompute the relative obstruction [0 ... 1] value into actual distance ...
8720 float obstruction = GetWeaponObstruction();
8721
8722 // ... unless there is no obstruction to begin with at which point the
8723 // additional checks are rendered competely irrelevant.
8724 if (obstruction <= 0.0)
8725 {
8726 return false;
8727 }
8728
8729 float penetration = weapon.GetObstructionPenetrationDistance(obstruction);
8730 bool inSights = m_CameraIronsight || m_CameraOptics;
8731 // Create a threshold that allows the user to remain in ADS for lesser obstruction
8732 // values, significantly reducing the continuous state changes near the edge.
8733 if (inSights)
8734 {
8735 return penetration > 0.040; // 4.0 cm
8736 }
8737 // Prevent the user from entering ADS if there is even a tiny fraction of obstruction,
8738 // further reinforcing the statement above.
8739 else
8740 {
8741 return penetration > 0.005; // 0.5 cm
8742 }
8743 }
override float GetWeaponObstruction()
Определения PlayerBase.c:8708
ItemBase GetItemInHands()
Определения PlayerBase.c:6733

Перекрестные ссылки GetItemInHands() и GetWeaponObstruction().