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

◆ IsWeaponObstructionBlockingADS()

override bool ManBase::IsWeaponObstructionBlockingADS ( )
inlineprotected

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

8110 {
8111 Weapon_Base weapon = Weapon_Base.Cast(GetItemInHands());
8112 if (!weapon)
8113 return false;
8114
8115 // Recompute the relative obstruction [0 ... 1] value into actual distance ...
8116 float obstruction = GetWeaponObstruction();
8117
8118 // ... unless there is no obstruction to begin with at which point the
8119 // additional checks are rendered competely irrelevant.
8120 if (obstruction <= 0.0)
8121 {
8122 return false;
8123 }
8124
8125 float penetration = weapon.GetObstructionPenetrationDistance(obstruction);
8126 bool inSights = m_CameraIronsight || m_CameraOptics;
8127 // Create a threshold that allows the user to remain in ADS for lesser obstruction
8128 // values, significantly reducing the continuous state changes near the edge.
8129 if (inSights)
8130 {
8131 return penetration > 0.040; // 4.0 cm
8132 }
8133 // Prevent the user from entering ADS if there is even a tiny fraction of obstruction,
8134 // further reinforcing the statement above.
8135 else
8136 {
8137 return penetration > 0.005; // 0.5 cm
8138 }
8139 }
override float GetWeaponObstruction()
Определения PlayerBase.c:8104
ItemBase GetItemInHands()
Определения PlayerBase.c:6202

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