diff options
Diffstat (limited to 'entities/weapons')
| -rw-r--r-- | entities/weapons/hands.lua | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/entities/weapons/hands.lua b/entities/weapons/hands.lua index 3d74aa3..c97249a 100644 --- a/entities/weapons/hands.lua +++ b/entities/weapons/hands.lua @@ -77,31 +77,10 @@ function SWEP:PrimaryAttack() end function SWEP:SecondaryAttack() - --[[ - if (CLIENT and !IsFirstTimePredicted()) then return end - if (!self.Owner.Weapons or !self.Owner.Weapons[self.Owner.Select]) then return end - if (self.Owner.CD and self.Owner.CD > CurTime()) then return end - - local item = self.Owner.Weapons[self.Owner.Select].Item - - if (!item or !item.OnSecondary) then return end - - self.Owner:SetAnimation( PLAYER_ATTACK1 ) - - local Trace = { - start = self.Owner:GetShootPos(), - endpos = self.Owner:GetShootPos()+self.Owner:GetAimVector()*item.Range, - filter = self.Owner, - mins = Box*-1, - maxs = Box, - } - - local Tr = util.TraceHull(Trace) - - item:OnSecondary(self.Owner,Tr) - - self.Owner.CD = CurTime()+item.CD - ]] + local rightitem = self.Owner.Inventory.Equiped["Right"] + if rightitem ~= false and rightitem.onClick ~= nil then + rightitem:onClick(self.Owner) + end end if (CLIENT) then |
