Skip to content

Commit

Permalink
Potential fix for penetrating particle error
Browse files Browse the repository at this point in the history
Might fix Dakota0001#26.

Removes the NULL and nil inequality checks for a more generic and safer evaluation.
  • Loading branch information
Stooberton authored Nov 7, 2021
1 parent 86eeee9 commit ca190ca
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lua/effects/dakteshellpenetrate/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,9 @@ function EFFECT:Init( data )
particle:SetBounce(0)
particle:SetNextThink( CurTime() )
particle:SetThinkFunction( function( pa )
if pa~=NULL then
if HitEnt~=NULL and Attach~=nil then
if HitEnt~=NULL and Attach~=nil then
pa:SetPos( HitEnt:LocalToWorld(Attach) )
end
pa:SetNextThink( CurTime() )
end
if pa and HitEnt and Attach then
pa:SetPos( HitEnt:LocalToWorld(Attach) )
pa:SetNextThink( CurTime() )
end
end )
end
Expand All @@ -160,4 +156,4 @@ function EFFECT:Think()
end

function EFFECT:Render()
end
end

0 comments on commit ca190ca

Please sign in to comment.