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

◆ IsWeaponObstructionBlockingADS()

override bool ManBase::IsWeaponObstructionBlockingADS ( )
inlineprotected

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

8360 {
8361 Weapon_Base weapon = Weapon_Base.Cast(GetItemInHands());
8362 if (!weapon)
8363 return false;
8364
8365 // Recompute the relative obstruction [0 ... 1] value into actual distance ...
8366 float obstruction = GetWeaponObstruction();
8367
8368 // ... unless there is no obstruction to begin with at which point the
8369 // additional checks are rendered competely irrelevant.
8370 if (obstruction <= 0.0)
8371 {
8372 return false;
8373 }
8374
8375 float penetration = weapon.GetObstructionPenetrationDistance(obstruction);
8376 bool inSights = m_CameraIronsight || m_CameraOptics;
8377 // Create a threshold that allows the user to remain in ADS for lesser obstruction
8378 // values, significantly reducing the continuous state changes near the edge.
8379 if (inSights)
8380 {
8381 return penetration > 0.040; // 4.0 cm
8382 }
8383 // Prevent the user from entering ADS if there is even a tiny fraction of obstruction,
8384 // further reinforcing the statement above.
8385 else
8386 {
8387 return penetration > 0.005; // 0.5 cm
8388 }
8389 }
override float GetWeaponObstruction()
Определения PlayerBase.c:8354
ItemBase GetItemInHands()
Определения PlayerBase.c:6437

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