Skip to content

Commit

Permalink
Merge pull request #87 from UTFTymoteusz/updatevalues
Browse files Browse the repository at this point in the history
UpdateValues entity IsValid check
  • Loading branch information
TwistedTail authored Sep 1, 2023
2 parents bbbff2e + 905d99a commit b3090b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/acf/core/utilities/entity_tracking_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local NextUpdate = 0
local Entities = {}
local Ancestors = {}

local Whitelist = {
local Whitelist = {
-- Garry's Mod entities
gmod_wheel = true,
gmod_hoverball = true,
Expand Down Expand Up @@ -50,6 +50,8 @@ local function GetAncestor(Entity)
end

local function UpdateValues(Entity)
if not IsValid(Entity) then return end

local PhysObj = Entity:GetPhysicsObject()
local Velocity = Entity:GetVelocity()
local PrevPos = Entity.Position
Expand Down

0 comments on commit b3090b3

Please sign in to comment.