Skip to content

Commit

Permalink
fixed bug in tankcore that could cause a dupe to stop spawning if an …
Browse files Browse the repository at this point in the history
…entity doesn't exist when it should
  • Loading branch information
Dakota0001 committed Oct 20, 2020
1 parent af17ad0 commit 0eb8610
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lua/entities/dak_tankcore/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ hook.Add("AdvDupe_FinishPasting", "daktank_tankcore_check", function(dupe)
local ents = dupe[1].CreatedEntities
for id, data in pairs(dupe[1].EntityList) do
local ent = ents[id]
if ent:GetClass() == "dak_tankcore" then
timer.Simple(engine.TickInterval(),function()
ent.DakFinishedPasting = 1
end)
if IsValid(ent) then
if ent:GetClass() == "dak_tankcore" then
timer.Simple(engine.TickInterval(),function()
ent.DakFinishedPasting = 1
end)
end
end
end
end)
Expand Down

0 comments on commit 0eb8610

Please sign in to comment.