Fix IsNailedToWorldHierarchy + prop_playergib errors.

This commit is contained in:
JetBoom 2014-11-16 19:02:13 -05:00
parent 07743641a6
commit 15d3347371
2 changed files with 6 additions and 2 deletions

View file

@ -3,10 +3,12 @@ AddCSLuaFile("shared.lua")
include("shared.lua")
ENT.DieTime = 0
function ENT:Initialize()
self.m_Health = 25
if not self.DieTime then
if self.DieTime == 0 then
self.DieTime = CurTime() + GAMEMODE.GibLifeTime
end

View file

@ -1737,7 +1737,9 @@ end
function GM:EvaluatePropFreeze(ent, neighbors)
if not ent then
for _, e in pairs(ents.GetAll()) do
self:EvaluatePropFreeze(e)
if e:IsValid() then
self:EvaluatePropFreeze(e)
end
end
return