mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
no shellfx for npcs
This commit is contained in:
parent
a98bea15ee
commit
fc1f783a7a
@ -21,13 +21,14 @@ function EFFECT:Init(data)
|
|||||||
local ent = data:GetEntity()
|
local ent = data:GetEntity()
|
||||||
|
|
||||||
if !IsValid(ent) then self:Remove() return end
|
if !IsValid(ent) then self:Remove() return end
|
||||||
if !IsValid(ent:GetOwner()) then self:Remove() return end
|
local owner, lp = ent:GetOwner(), LocalPlayer()
|
||||||
|
if !IsValid(owner) then self:Remove() return end
|
||||||
|
|
||||||
if ent:GetOwner() != LocalPlayer() or LocalPlayer():ShouldDrawLocalPlayer() then
|
if owner != lp or lp:ShouldDrawLocalPlayer() then
|
||||||
mdl = (ent.WModel or {})[1] or ent
|
mdl = (ent.WModel or {})[1] or ent
|
||||||
self.VMContext = false
|
self.VMContext = false
|
||||||
else
|
else
|
||||||
mdl = LocalPlayer():GetViewModel()
|
mdl = lp:GetViewModel()
|
||||||
|
|
||||||
if ent:ShouldTPIK() then
|
if ent:ShouldTPIK() then
|
||||||
self.VMContext = false
|
self.VMContext = false
|
||||||
@ -42,7 +43,7 @@ function EFFECT:Init(data)
|
|||||||
|
|
||||||
local origin, ang = mdl:GetAttachment(att).Pos, mdl:GetAttachment(att).Ang
|
local origin, ang = mdl:GetAttachment(att).Pos, mdl:GetAttachment(att).Ang
|
||||||
|
|
||||||
if (LocalPlayer():ShouldDrawLocalPlayer() or ent.Owner != LocalPlayer()) then
|
if (lp:ShouldDrawLocalPlayer() or ent.Owner != lp) then
|
||||||
wm = true
|
wm = true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -144,7 +145,7 @@ function EFFECT:Init(data)
|
|||||||
phys:AddAngleVelocity(VectorRand() * 100)
|
phys:AddAngleVelocity(VectorRand() * 100)
|
||||||
phys:AddAngleVelocity(ang:Up() * 2500 * velocity / 0.75)
|
phys:AddAngleVelocity(ang:Up() * 2500 * velocity / 0.75)
|
||||||
|
|
||||||
if !arc9_eject_fx:GetBool() then
|
if owner:IsNPC() or !arc9_eject_fx:GetBool() then
|
||||||
smoke = false
|
smoke = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user