From d4f197a35c207c9891d3f4dc5e9708af48c935de Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Tue, 9 Aug 2016 17:53:52 -0400 Subject: Added some weapons --- entities/weapons/hands.lua | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'entities/weapons/hands.lua') 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 -- cgit v1.2.3-70-g09d2