We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26d2710 commit 234d00cCopy full SHA for 234d00c
lua/entities/gmod_wire_keypad.lua
@@ -49,18 +49,18 @@ if CLIENT then
49
function ENT:Draw()
50
self:DrawModel()
51
52
- local ply = LocalPlayer()
53
local entpos = self:GetPos()
54
- if entpos:Distance(ply:GetShootPos()) > 512 then return end
+ if entpos:Distance(EyePos()) > 512 then return end
55
56
local ang = self:GetAngles()
57
- entpos = entpos + self:GetForward() * 1.05
+ entpos:Add(self:GetForward() * 1.05)
58
59
ang:RotateAroundAxis(ang:Right(), -90)
60
ang:RotateAroundAxis(ang:Up(), 90)
61
ang:RotateAroundAxis(ang:Forward(), 0)
62
63
cam.Start3D2D(entpos, ang, 0.05)
+ local ply = LocalPlayer()
64
local trace = ply:GetEyeTrace()
65
local pos = self:WorldToLocal(trace.HitPos)
66
0 commit comments