mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-27 20:43:02 +05:00
some fixes
This commit is contained in:
parent
fc75bd10a0
commit
29403cf5dd
6 changed files with 11 additions and 9 deletions
|
@ -66,6 +66,8 @@ function SWEP:PrimaryAttack()
|
|||
if SERVER then
|
||||
local zip = CreateZipline(ply:EyePos(), ply:GetEyeTrace().HitPos)
|
||||
|
||||
zip:SetTwoWay(true)
|
||||
|
||||
table.insert(self.ziplines, zip)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1413,7 +1413,10 @@ function ArmInterrupt(anim)
|
|||
if string.match(anim, "standhandwall") then
|
||||
local ply = LocalPlayer()
|
||||
local trace = util.QuickTrace(ply:GetShootPos(), ply:GetAimVector() * 30, ply)
|
||||
local newAng = Angle(trace.Normal.x * (5 * trace.Fraction * trace.Normal.x), 0, trace.Normal.x * (10 * trace.Fraction * trace.Normal.y))
|
||||
local x = trace.Normal.x < 0.6 and trace.Normal.x or trace.Normal.y
|
||||
local y = trace.Normal.y > -0.8 and trace.Normal.y or -trace.Normal.x
|
||||
|
||||
local newAng = Angle(x * (5 * trace.Fraction * x), 0, x * (10 * trace.Fraction * y))
|
||||
|
||||
ply:ChatPrint("Fraction: " .. tostring(trace.Fraction))
|
||||
ply:ChatPrint("Normal: " .. tostring(trace.Normal))
|
||||
|
|
|
@ -246,8 +246,6 @@ hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
|
|||
ply:SetMEMoveLimit(150)
|
||||
ply:SetMESprintDelay(0)
|
||||
ply:SetMEAng(0)
|
||||
|
||||
-- mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_JUMP)))
|
||||
end
|
||||
|
||||
local ang = mv:GetAngles()
|
||||
|
@ -370,7 +368,6 @@ if CLIENT then
|
|||
|
||||
hook.Add("CreateMove", "MECreateMove", function(cmd)
|
||||
local ply = LocalPlayer()
|
||||
local usingrh = ply:UsingRH()
|
||||
local hardland = CurTime() < (ply.hardlandtime or 0)
|
||||
|
||||
if hardland and not ply:InOverdrive() then
|
||||
|
@ -379,7 +376,7 @@ if CLIENT then
|
|||
cmd:SetSideMove(cmd:GetSideMove() * 0.01)
|
||||
end
|
||||
|
||||
if (ply:InOverdrive() or usingrh and ply:GetMoveType() == MOVETYPE_WALK and not hardland and ply:OnGround()) and not cmd:KeyDown(IN_SPEED) and not ply:GetSliding() and not IsValid(ply:GetBalanceEntity()) then
|
||||
if (ply:InOverdrive() or ply:UsingRH() and ply:GetMoveType() == MOVETYPE_WALK and not hardland and ply:OnGround()) and not cmd:KeyDown(IN_SPEED) and not ply:GetSliding() and not IsValid(ply:GetBalanceEntity()) then
|
||||
cmd:SetButtons(cmd:GetButtons() + IN_SPEED)
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -7,7 +7,7 @@ local landang = Angle(0, 0, 0)
|
|||
local function SafetyRollThink(ply, mv, cmd)
|
||||
local speed = mv:GetVelocity().z
|
||||
|
||||
if speed <= -350 and not ply:OnGround() and not ply:GetWasOnGround() and (mv:KeyPressed(IN_SPEED) or mv:KeyPressed(IN_DUCK) or mv:KeyPressed(IN_BULLRUSH)) then
|
||||
if speed <= -350 and not ply:OnGround() and not ply:GetWasOnGround() and (mv:KeyPressed(IN_DUCK) or mv:KeyPressed(IN_SPEED) or mv:KeyPressed(IN_BULLRUSH)) then
|
||||
ply:SetSafetyRollKeyTime(CurTime() + 0.5)
|
||||
|
||||
mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_DUCK)))
|
||||
|
|
|
@ -72,7 +72,7 @@ local function SlidingAnimThink()
|
|||
local newang = LerpAngle(20 * FrameTime(), oldang, ang)
|
||||
ba:SetAngles(newang)
|
||||
|
||||
BodyLimitX = math.min(40 + ang[1] - 360, 60)
|
||||
BodyLimitX = math.min(20 + ang[1] - 360, 60)
|
||||
CamShakeMult = ply:GetVelocity():Length() * 0.0005
|
||||
end
|
||||
end
|
||||
|
@ -346,7 +346,7 @@ hook.Add("SetupMove", "qslide", function(ply, mv, cmd)
|
|||
|
||||
local normal = slipperytraceout.HitNormal
|
||||
local sang = normal:Angle()
|
||||
local slippery = sang.x > 315 and sang.x < 330 and ply:GetMoveType() ~= MOVETYPE_NOCLIP and not ply:GetCrouchJump() and onground and not slipfail
|
||||
local slippery = sang.x > 315 and sang.x < 330 and ply:GetMoveType() ~= MOVETYPE_NOCLIP and not ply:GetCrouchJump() and onground and not slipfail and ply:WaterLevel() < 1
|
||||
|
||||
ply:SetSlidingSlippery(slippery)
|
||||
|
||||
|
|
|
@ -526,7 +526,7 @@ hook.Add("SetupMove", "Wallrunning", function(ply, mv, cmd)
|
|||
ply:SetWallrun(0)
|
||||
end
|
||||
|
||||
if ply:GetWallrun() == 0 and mv:GetVelocity().z > -450 and not ply:OnGround() and mv:KeyDown(IN_FORWARD) and not ply:Crouching() and not mv:KeyDown(IN_DUCK) and ply:GetMoveType() ~= MOVETYPE_NOCLIP then
|
||||
if ply:GetWallrun() == 0 and mv:GetVelocity().z > -450 and not ply:OnGround() and mv:KeyDown(IN_FORWARD) and not ply:Crouching() and not mv:KeyDown(IN_DUCK) and ply:GetMoveType() ~= MOVETYPE_NOCLIP and ply:WaterLevel() < 1 then
|
||||
WallrunningCheck(ply, mv, cmd)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue