Skip to content

Commit

Permalink
Merge pull request #360 from wrefgtzweve/fix-world-lag
Browse files Browse the repository at this point in the history
Add world check to prevent lagspike
  • Loading branch information
TwistedTail authored Jul 11, 2023
2 parents ba4b8f6 + 3c9aa6f commit b79e1f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/acf/core/utilities/util_sh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ do -- ACF.GetHitAngle
local hitNormal = trace.HitNormal
local rayNormal = rayNormal:GetNormalized()

if trace.Hit and hitNormal == v0 then
if trace.Hit and hitNormal == v0 and trace.Entity ~= game.GetWorld() then
local rayOrigin = trace.HitPos - rayNormal * 5000

hitNormal = rayIntersect(trace.Entity, rayOrigin, rayNormal)
Expand Down

0 comments on commit b79e1f8

Please sign in to comment.