Skip to content

Commit

Permalink
Fix IsLegal tests
Browse files Browse the repository at this point in the history
  • Loading branch information
thecraftianman committed Feb 20, 2024
1 parent cdeb576 commit 985c035
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/acf/core/validation_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ function ACF.IsLegal(Entity)

local Phys = Entity:GetPhysicsObject()

if not IsValid(Entity.ACF.PhysObj) or Entity.ACF.PhysObj ~= Phys then
if not IsValid(Entity.ACF.PhysObj) then
Entity.ACF.PhysObj = Phys
end

if Entity.ACF.PhysObj ~= Phys then
if Phys:GetVolume() then
Entity.ACF.PhysObj = Phys -- Updated PhysObj
else
Expand Down

0 comments on commit 985c035

Please sign in to comment.