Skip to content

Commit

Permalink
Updated EFFECT.HasLeftWorld to not use a trace
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistedTail committed Jun 25, 2024
1 parent b8cd70b commit 2fed5f6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lua/effects/acf_projectile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local util = util
local ACF = ACF
local Bullets = ACF.BulletEffect
local AmmoTypes = ACF.Classes.AmmoTypes
local Trace = { collisiongroup = COLLISION_GROUP_WORLD }


local Actions = {
[0] = "Create",
Expand All @@ -12,10 +12,9 @@ local Actions = {
}

function EFFECT.HasLeftWorld(Position)
Trace.start = Position
Trace.endpos = Position
local Contents = util.PointContents(Position)

return util.TraceLine(Trace).HitWorld
return bit.band(Contents, 1) == 1 -- CONTENTS_SOLID = 1
end

function EFFECT:Init(Data)
Expand Down

0 comments on commit 2fed5f6

Please sign in to comment.