Called when 2D optics are about to be drawn.
3904 {
3905 array<InventoryItem> optics;
3906
3907
3909 {
3910 HumanInventory inventory = GetHumanInventory();
3912
3914 if (opticsInHands)
3915 {
3916 preferredOptics = opticsInHands;
3917 }
3918 else
3919 {
3920 Weapon_Base weaponInHands = Weapon_Base.Cast(itemInHands);
3921 if (weaponInHands)
3922 {
3923 preferredOptics = weaponInHands.GetAttachedOptics();
3924 }
3925 }
3926 }
3927
3928
3930 {
3931 optics = {};
3932 optics.Insert(preferredOptics);
3933 }
3934
3935
3937 if (nvAttachment)
3938 {
3940 if (!blockedByOptics && PlayerBase.Cast(this).IsNVGWorking())
3941 {
3942 NVGoggles nvg = NVGoggles.Cast(nvAttachment);
3943 if (nvg)
3944 {
3945 if (!optics)
3946 optics = {};
3947
3948 optics.Insert(nvg);
3949 }
3950 }
3951 }
3952
3953 return optics;
3954 }
StarlightOptic ItemOptics
EntityAI GetNVEntityAttached()
proto native EntityAI GetEntityInHands()
bool IsUsingOptics2DModel()
Returns whether this ItemOptics uses the 2D optics model.
proto native bool IsInOptics()
is weapon in optics mode or not