I’m having some issues with the impact of shots on one of my weapon bases.
Basically it goes through a lot of props as well as going through all doors, it still shows a decal of the shot on the prop/door it’s shot through but also a decal on the other side.
I’ve narrowed down the code that is causing the issue but I’m not too great when it comes to trace and impact, only used it once for an over player head HUD.
Any help would be much appreciated<3
function SWEP:DoImpactEffect( tr, dmgtype ) if( tr.HitSky ) then return true; end util.Decal( "fadingscorch", tr.HitPos + tr.HitNormal, tr.HitPos - tr.HitNormal ); if( game.SinglePlayer() or SERVER or not self:IsCarriedByLocalPlayer() or IsFirstTimePredicted() ) then local effect = EffectData(); effect:SetOrigin( tr.HitPos ); effect:SetNormal( tr.HitNormal ); util.Effect( "effect_sw_impact", effect ); local effect = EffectData(); effect:SetOrigin( tr.HitPos ); effect:SetStart( tr.StartPos ); effect:SetDamageType( dmgtype ); util.Effect( "RagdollImpact", effect ); end return true; end
Thanks in advanced,