From 95d24ee304a7f1bfa5179d9b5e97c5f0b4b27e03 Mon Sep 17 00:00:00 2001 From: icedream Date: Sat, 21 Dec 2013 00:02:40 +0100 Subject: [PATCH] LocalPlayer():GetWeapon == nil, wat!? --- lua/weapons/disguiser/cl_fxfake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/weapons/disguiser/cl_fxfake.lua b/lua/weapons/disguiser/cl_fxfake.lua index 7094015..d78d41d 100644 --- a/lua/weapons/disguiser/cl_fxfake.lua +++ b/lua/weapons/disguiser/cl_fxfake.lua @@ -33,9 +33,9 @@ usermessage.Hook("disguiserShootFX", function(um) local bFirstTimePredicted = um:ReadBool() // Player and weapon valid? - if !IsValid(LocalPlayer()) || !IsValid(LocalPlayer():GetWeapon("disguiser")) then return false end + if !IsValid(LocalPlayer()) || !IsValid(LocalPlayer():GetWeapon()) || !IsValid(LocalPlayer():GetWeapon().DoShootEffect then return false end // Render shoot effect - LocalPlayer():GetWeapon("disguiser").DoShootEffect( + LocalPlayer():GetWeapon("disguiser"):DoShootEffect( hitpos, hitnormal, entity, physbone, bFirstTimePredicted) end) \ No newline at end of file