Fixed ladder jump of not working in x64

This commit is contained in:
Jonny_Bro (Nikita) 2023-08-10 21:38:06 +05:00
parent a1f535a731
commit d36fc16df8

View file

@ -224,10 +224,11 @@ local function LadderThink(ply, mv, cmd, ladder)
local ladderangf = ladder:GetAngles():Forward() local ladderangf = ladder:GetAngles():Forward()
local newpos = mv:GetOrigin() local newpos = mv:GetOrigin()
local facing = { local facing = {
pos = ladderangf.x == 1 and "x" or ladderangf.x == -1 and "x" or ladderangf.y == 1 and "y" or ladderangf.y == -1 and "y", pos = math.Round(ladderangf.x) == 1 and "x" or math.Round(ladderangf.x) == -1 and "x" or math.Round(ladderangf.y) == 1 and "y" or math.Round(ladderangf.y) == -1 and "y",
num = ladderangf.x == 1 and 40 or ladderangf.x == -1 and -40 or ladderangf.y == 1 and 40 or ladderangf.y == -1 and -40, num = math.Round(ladderangf.x) == 1 and 40 or math.Round(ladderangf.x) == -1 and -40 or math.Round(ladderangf.y) == 1 and 40 or math.Round(ladderangf.y) == -1 and -40,
} }
print(math.Round(ladderangf.x))
newpos[facing.pos] = mv:GetOrigin()[facing.pos] + facing.num newpos[facing.pos] = mv:GetOrigin()[facing.pos] + facing.num
mv:SetOrigin(newpos) mv:SetOrigin(newpos)