some cleaning

This commit is contained in:
Jonny_Bro (Nikita) 2023-06-08 12:48:58 +05:00
parent 68123fd08b
commit d740037f6a
4 changed files with 4 additions and 7 deletions

View file

@ -153,6 +153,7 @@ hook.Add("SetupMove", "Grapple", function(ply, mv, cmd)
if ply:GetNW2Bool("grappledNonCourse") and ent:GetClass() ~= "worldspawn" then if ply:GetNW2Bool("grappledNonCourse") and ent:GetClass() ~= "worldspawn" then
ent:SetNWVector("glastpos", ent:GetNWVector("gpos", ent:GetPos())) ent:SetNWVector("glastpos", ent:GetNWVector("gpos", ent:GetPos()))
ent:SetNWVector("gpos", ent:GetPos()) ent:SetNWVector("gpos", ent:GetPos())
local delta = ent:GetNWVector("gpos", Vector(0,0,0)) - ent:GetNWVector("glastpos", Vector(0, 0, 0)) local delta = ent:GetNWVector("gpos", Vector(0,0,0)) - ent:GetNWVector("glastpos", Vector(0, 0, 0))
ply:SetGrapplePos(ply:GetGrapplePos() + delta) ply:SetGrapplePos(ply:GetGrapplePos() + delta)
end end

View file

@ -172,7 +172,7 @@ local function MeleeThink(ply, mv, cmd)
if ply:GetMelee() >= 5 then if ply:GetMelee() >= 5 then
local vel = mv:GetVelocity() local vel = mv:GetVelocity()
// why is getwallrundir in the thousands? -- why is getwallrundir in the thousands?
vel:Add(ply:GetWallrunDir():GetNormalized() * 0.5 * vel:Length()) vel:Add(ply:GetWallrunDir():GetNormalized() * 0.5 * vel:Length())
mv:SetVelocity(vel) mv:SetVelocity(vel)

View file

@ -826,7 +826,6 @@ if CLIENT then
aimvector = util.AimVector(eyeang, 133, mousex, mousey, ScrW(), ScrH()) aimvector = util.AimVector(eyeang, 133, mousex, mousey, ScrW(), ScrH())
local dmult = 1 local dmult = 1
if input.IsKeyDown(KEY_LALT) then dmult = 0.1 end if input.IsKeyDown(KEY_LALT) then dmult = 0.1 end
@ -967,8 +966,6 @@ if CLIENT then
local name = args[1] or "Unnamed" local name = args[1] or "Unnamed"
-- local compress = not args[2] -- local compress = not args[2]
print(args[2])
SaveCourse(name, args[2]) SaveCourse(name, args[2])
end) end)

View file

@ -630,9 +630,8 @@ end)
local ISCALC = false local ISCALC = false
hook.Add("CalcView", "VManip_Cam", function(ply, origin, angles, fov) hook.Add("CalcView", "VManip_Cam", function(ply, origin, angles, fov)
// we dont really care about camera manipulations from other hooks during this, thus we can ignore them. -- we dont really care about camera manipulations from other hooks during this, thus we can ignore them.
// some important calculations can happen in calcview hooks however, so running them is important -- some important calculations can happen in calcview hooks however, so running them is important
if ISCALC then return end if ISCALC then return end
ISCALC = true ISCALC = true
hook.Run("CalcView", ply, pos, ang, fov) hook.Run("CalcView", ply, pos, ang, fov)