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

◆ GetObstructionPenetrationDistance()

float Weapon::GetObstructionPenetrationDistance ( float obstruction01)
inlineprivate

Recomputes the provided obstruction01 value typically returned by LiftWeaponCheckEx from the [0 ... 1] range to distance in meters the weapon penetrates the obstacle.

Аргументы
obstruction01Obstruction progress
Возвращает
Penetration depth in meters

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

1981 {
1982 float baseObstructionLength = m_ObstructionDistance;
1983 if (baseObstructionLength==0)
1984 {
1985 baseObstructionLength = ApproximateBaseObstructionLength();
1986 }
1987
1988 float effectiveAttachmentLength = GetEffectiveAttachmentLength();
1989 float weaponEnd = m_ShoulderDistance + m_WeaponLength + effectiveAttachmentLength;
1990 return weaponEnd - Math.Lerp(weaponEnd, baseObstructionLength + effectiveAttachmentLength, obstruction01);
1991 }
float m_ObstructionDistance
Определения Weapon_Base.c:67
float GetEffectiveAttachmentLength()
Returns effective length of attachments that influence total weapon length.
Определения Weapon_Base.c:2000
float m_ShoulderDistance
Определения Weapon_Base.c:66
float m_WeaponLength
Определения Weapon_Base.c:64
float ApproximateBaseObstructionLength()
Approximate ObstructionDistance for weapons with no configuration. Returned length doesn't account fo...
Определения Weapon_Base.c:1637

Перекрестные ссылки ApproximateBaseObstructionLength(), GetEffectiveAttachmentLength(), Math::Lerp(), m_ObstructionDistance, m_ShoulderDistance и m_WeaponLength.