mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-28 12:53:02 +05:00
proper kick glitch
This commit is contained in:
parent
77140245e9
commit
5729cb7dc4
1 changed files with 17 additions and 5 deletions
|
@ -270,11 +270,23 @@ hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
if ply:GetMeleeDelay() < CurTime() and ply:GetMelee() ~= 0 then
|
if ply:GetMeleeDelay() < CurTime() and ply:GetMelee() ~= 0 then
|
||||||
if kickglitch:GetBool() and ply:GetMelee() >= 5 and mv:KeyDown(IN_JUMP) and not ply:OnGround() then
|
if kickglitch:GetBool() and ply:GetMelee() >= 5 and not ply:OnGround() then
|
||||||
local vel = mv:GetVelocity()
|
if SERVER then
|
||||||
vel:Mul(1.25)
|
local platform = ents.Create("prop_physics")
|
||||||
vel.z = 300
|
local pos = ply:GetPos()
|
||||||
mv:SetVelocity(vel)
|
|
||||||
|
pos.z = pos.z - 8
|
||||||
|
|
||||||
|
platform:SetModel("models/hunter/plates/plate05x05.mdl")
|
||||||
|
platform:SetPos(pos)
|
||||||
|
platform:SetColor(Color(0,0,0,0))
|
||||||
|
platform:SetRenderMode(RENDERMODE_TRANSCOLOR)
|
||||||
|
platform:Spawn()
|
||||||
|
local phys = platform:GetPhysicsObject()
|
||||||
|
phys:EnableMotion(false)
|
||||||
|
|
||||||
|
timer.Simple(0.3, function() SafeRemoveEntity(platform) end)
|
||||||
|
end
|
||||||
|
|
||||||
ParkourEvent("jumpslow", ply)
|
ParkourEvent("jumpslow", ply)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue