LocalPlayer():GetWeapon == nil, wat!?

master
Icedream 2013-12-21 00:02:40 +01:00
parent d4defe253e
commit 95d24ee304
1 changed files with 2 additions and 2 deletions

View File

@ -33,9 +33,9 @@ usermessage.Hook("disguiserShootFX", function(um)
local bFirstTimePredicted = um:ReadBool() local bFirstTimePredicted = um:ReadBool()
// Player and weapon valid? // 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 // Render shoot effect
LocalPlayer():GetWeapon("disguiser").DoShootEffect( LocalPlayer():GetWeapon("disguiser"):DoShootEffect(
hitpos, hitnormal, entity, physbone, bFirstTimePredicted) hitpos, hitnormal, entity, physbone, bFirstTimePredicted)
end) end)