From f65cc5fb03a3aafcce0872472a355ccc110909cd Mon Sep 17 00:00:00 2001 From: icedream Date: Mon, 3 Mar 2014 01:22:36 +0100 Subject: [PATCH] Don't crash on faulty player (missing GetAimVector, fixes the bug mentioned on the front page). --- lua/weapons/disguiser/cl_3rdperson.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/weapons/disguiser/cl_3rdperson.lua b/lua/weapons/disguiser/cl_3rdperson.lua index 81e9817..2d75d89 100644 --- a/lua/weapons/disguiser/cl_3rdperson.lua +++ b/lua/weapons/disguiser/cl_3rdperson.lua @@ -96,7 +96,7 @@ end) hook.Add("HUDPaint", "Disguiser.ThirdPersonHUDPaint", function() local ply = LocalPlayer() - if IsValid(ply) && ply:Alive() && ply:GetNetworkedBool("thirdperson") then + if IsValid(ply) && !!ply["GetAimVector"] && ply:Alive() && ply:GetNetworkedBool("thirdperson") then // trace from muzzle to hit pos local t = {} t.start = ply:GetShootPos()