So not even the documentation told me that LocalPlayer() doesn't even have GetWeapon.

master
Icedream 2013-12-21 00:11:16 +01:00
parent 5aa438d6b1
commit d6795521e6
1 changed files with 2 additions and 2 deletions

View File

@ -33,9 +33,9 @@ usermessage.Hook("disguiserShootFX", function(um)
local bFirstTimePredicted = um:ReadBool()
// Player and weapon valid?
if !IsValid(LocalPlayer()) || !IsValid(LocalPlayer():GetWeapon()) || !IsValid(LocalPlayer():GetWeapon().DoShootEffect) then return false end
if !IsValid(LocalPlayer()) || !IsValid(LocalPlayer():GetActiveWeapon()) || !IsValid(LocalPlayer():GetActiveWeapon().DoShootEffect) then return false end
// Render shoot effect
LocalPlayer():GetWeapon("disguiser"):DoShootEffect(
LocalPlayer():GetActiveWeapon("disguiser"):DoShootEffect(
hitpos, hitnormal, entity, physbone, bFirstTimePredicted)
end)