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

◆ GetEffectiveAttachmentLength()

float Weapon::GetEffectiveAttachmentLength ( )
inlineprotected

Returns effective length of attachments that influence total weapon length.

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

1708 {
1709 ItemBase attachment;
1710 if (HasBayonetAttached())
1711 {
1712 int bayonetIndex = GetBayonetAttachmentIdx();
1713 attachment = ItemBase.Cast(GetInventory().FindAttachment(bayonetIndex));
1714 }
1715 else
1716 {
1717 attachment = GetAttachedSuppressor();
1718 }
1719
1720 if (attachment)
1721 {
1722 return Math.Max(attachment.m_ItemModelLength + attachment.m_ItemAttachOffset, 0);
1723 }
1724 else
1725 {
1726 return 0;
1727 }
1728 }
class GP5GasMask extends MaskBase ItemBase
override int GetBayonetAttachmentIdx()
Определения Weapon_Base.c:1806
override bool HasBayonetAttached()
Определения Weapon_Base.c:1801

Перекрестные ссылки GetBayonetAttachmentIdx(), HasBayonetAttached() и Math::Max().

Используется в LiftWeaponCheck().