diff --git a/gamemodes/zombiesurvival/entities/entities/prop_playergib/init.lua b/gamemodes/zombiesurvival/entities/entities/prop_playergib/init.lua index f9b0a1f..181f83b 100644 --- a/gamemodes/zombiesurvival/entities/entities/prop_playergib/init.lua +++ b/gamemodes/zombiesurvival/entities/entities/prop_playergib/init.lua @@ -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 diff --git a/gamemodes/zombiesurvival/gamemode/init.lua b/gamemodes/zombiesurvival/gamemode/init.lua index 7fbc640..86d7a95 100644 --- a/gamemodes/zombiesurvival/gamemode/init.lua +++ b/gamemodes/zombiesurvival/gamemode/init.lua @@ -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