Skip to content

Commit

Permalink
More reliable jumppack
Browse files Browse the repository at this point in the history
Old method is inconsistent and easily exploited (using cl_cmdrate).
  • Loading branch information
h3xcat committed Mar 26, 2016
1 parent f56c271 commit fd888cf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lua/pointshop/items/accessories/jumppack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ function ITEM:ModifyClientsideModel(ply, model, pos, ang)
return model, pos, ang
end

function ITEM:Think(ply, modifications)
if ply:KeyDown(IN_JUMP) then
ply:SetVelocity(ply:GetUp() * 6)
function ITEM:SetupMove( pl, modifications, ply, data)
local bdata = data:GetButtons()
if bit.band( bdata, IN_JUMP ) > 0 then
data:SetVelocity( data:GetVelocity() + Vector(0,0,100)*FrameTime() )
end
end
end

0 comments on commit fd888cf

Please sign in to comment.