DayZ 1.28
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 строка 1986

1987 {
1988 float baseObstructionLength = m_ObstructionDistance;
1989 if (baseObstructionLength==0)
1990 {
1991 baseObstructionLength = ApproximateBaseObstructionLength();
1992 }
1993
1994 float effectiveAttachmentLength = GetEffectiveAttachmentLength();
1995 float weaponEnd = m_ShoulderDistance + m_WeaponLength + effectiveAttachmentLength;
1996 return weaponEnd - Math.Lerp(weaponEnd, baseObstructionLength + effectiveAttachmentLength, obstruction01);
1997 }
float m_ObstructionDistance
Определения Weapon_Base.c:67
float GetEffectiveAttachmentLength()
Returns effective length of attachments that influence total weapon length.
Определения Weapon_Base.c:2006
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:1643

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