Fixed OnLastHuman constantly firing for logic_infliction

Moved the input fire function to only activate once.
This commit is contained in:
Ben 2014-10-28 02:21:34 +00:00
parent 6e8927ce89
commit 1e37335465

View file

@ -1059,14 +1059,14 @@ function GM:LastHuman(pl)
net.WriteEntity(pl or NULL) net.WriteEntity(pl or NULL)
net.Broadcast() net.Broadcast()
for _, ent in pairs(ents.FindByClass("logic_infliction")) do
ent:Input("onlasthuman", pl, pl, pl and pl:IsValid() and pl:EntIndex() or -1)
end
LASTHUMAN = true LASTHUMAN = true
end end
self.TheLastHuman = pl self.TheLastHuman = pl
for _, ent in pairs(ents.FindByClass("logic_infliction")) do
ent:Input("onlasthuman", pl, pl, pl and pl:IsValid() and pl:EntIndex() or -1)
end
end end
function GM:PlayerHealedTeamMember(pl, other, health, wep) function GM:PlayerHealedTeamMember(pl, other, health, wep)