diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-24 20:32:34 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2017-08-24 20:32:34 -0400 |
| commit | 233e478e40d72a091f70f18dc6846066a4f52016 (patch) | |
| tree | cf34be714088889731736c81bd44e198c792625a /entities/weapons/hands.lua | |
| parent | 61bc16dae5a1b61bcd237d9f0be36125829d95b1 (diff) | |
| download | artery-233e478e40d72a091f70f18dc6846066a4f52016.tar.gz artery-233e478e40d72a091f70f18dc6846066a4f52016.tar.bz2 artery-233e478e40d72a091f70f18dc6846066a4f52016.zip | |
Fix all linter warnings
Diffstat (limited to 'entities/weapons/hands.lua')
| -rw-r--r-- | entities/weapons/hands.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/entities/weapons/hands.lua b/entities/weapons/hands.lua index 7532104..553c4f1 100644 --- a/entities/weapons/hands.lua +++ b/entities/weapons/hands.lua @@ -51,13 +51,13 @@ end function SWEP:Tick() if self.Pickup ~= nil then - + --Set position local targetpos = (self.Owner:EyeAngles():Forward() * self.PickupOffset * 2) + self.Owner:GetPos() + Vector(0,0,64) local deltavel = targetpos - (self.Pickup:GetPos() + self.Pickup:GetVelocity()) local clampvel = Vector(math.Clamp(deltavel.x,-100,100),math.Clamp(deltavel.y,-100,100),math.Clamp(deltavel.z,-100,100)) self.Pickup:GetPhysicsObject():SetVelocity(clampvel) - + --Set angles local targetang = self.Owner:EyeAngles() + self.PickupAngles local angvel = self.Pickup:GetAngles() - targetang @@ -74,17 +74,17 @@ end function SWEP:PrimaryAttack() if CLIENT then return end - + --Make sure we have an equipment inventory if not self.Owner then return end if not self.Owner.data then return end if not self.Owner.data.inventories then return end if not self.Owner.data.inventories[1] then return end local eqpd = self.Owner.data.inventories[1] - + --Get the weapon we want to fire, and fire it! local weapon = eqpd:Get({"Left Hand"}) or eqpd:Get({"Dual"}) - if not weapon then + if not weapon then self:DefaultPickup() elseif weapon.onClick ~= nil then weapon:onClick(self.Owner) @@ -93,17 +93,17 @@ end function SWEP:SecondaryAttack() if CLIENT then return end - + --Make sure we have an equipment inventory if not self.Owner then return end if not self.Owner.data then return end if not self.Owner.data.inventories then return end if not self.Owner.data.inventories[1] then return end local eqpd = self.Owner.data.inventories[1] - + --Get the weapon we want to fire, and fire it! local weapon = eqpd:Get({"Right Hand"}) or eqpd:Get({"Dual"}) - if not weapon then + if not weapon then self:DefaultPickup() elseif weapon.onClick ~= nil then weapon:onClick(self.Owner) |
