NoLeftHandInCustomization

This commit is contained in:
Haodong Mo 2021-05-01 12:41:41 +10:00
parent 1214f7657d
commit 35460d154f
3 changed files with 10 additions and 4 deletions

View File

@ -152,6 +152,8 @@ att.LHIK_Animation = false
att.LHIK_GunDriver = ""
att.LHIK_CamDriver = ""
att.Override_NoHideLeftHandInCustomization = nil
att.ActivateElements = {}
att.MountPositionOverride = nil -- set between 0 to 1 to always mount in a certain position

View File

@ -101,10 +101,12 @@ function SWEP:DoLHIK()
local vm = self:GetOwner():GetViewModel()
if self:GetState() == ArcCW.STATE_CUSTOMIZE then
self.Customize_Hide = math.Approach(self.Customize_Hide, 1, FrameTime() / 0.25)
else
self.Customize_Hide = math.Approach(self.Customize_Hide, 0, FrameTime() / 0.25)
if !self.NoHideLeftHandInCustomization and !self:GetBuff_Override("Override_NoHideLeftHandInCustomization") then
if self:GetState() == ArcCW.STATE_CUSTOMIZE then
self.Customize_Hide = math.Approach(self.Customize_Hide, 1, FrameTime() / 0.25)
else
self.Customize_Hide = math.Approach(self.Customize_Hide, 0, FrameTime() / 0.25)
end
end
for i, k in pairs(self.Attachments) do

View File

@ -42,6 +42,8 @@ SWEP.WorldModelOffset = nil
-- ang = Angle(0, 0, 0)
-- }
SWEP.NoHideLeftHandInCustomization = false
SWEP.Damage = 26
SWEP.DamageMin = 10 -- damage done at maximum range
SWEP.DamageRand = 0 -- damage will vary randomly each shot by this fraction