mirror of
https://gitlab.com/hoggit/developers/hoggit.git
synced 2025-11-10 15:43:28 +00:00
possible fix for death handler issues
This commit is contained in:
parent
fe1d7c341c
commit
bf0511af4d
@ -196,10 +196,15 @@ HOGGIT._deathHandler = function(event)
|
||||
if event.id == world.event.S_EVENT_CRASH or event.id == world.event.S_EVENT_DEAD or event.id == world.event.S_EVENT_ENGINE_SHUTDOWN then
|
||||
HOGGIT.debug_text("SOMETHING DEAD YO", 10)
|
||||
if not event.initiator then return end
|
||||
if not event.initiator.getGroup then return end
|
||||
if not event.initiator:getGroup() then return end
|
||||
if not event.initiator.getName then return end
|
||||
if not event.initiator:getName() then return end
|
||||
|
||||
local grp = event.initiator:getGroup():getName()
|
||||
local uName = event.initiator:getName()
|
||||
|
||||
local mGrp = mist.DBs.unitsByName[uName]
|
||||
if not mGrp then return end
|
||||
|
||||
local grp = mimGrp.groupName
|
||||
if grp then
|
||||
HOGGIT.debug_text("FOUND GROUP", 10)
|
||||
if HOGGIT.zombies[grp] then
|
||||
@ -216,7 +221,7 @@ HOGGIT._deathHandler = function(event)
|
||||
HOGGIT.debug_text("STARTING DEAD CHECK", 10)
|
||||
local needs_respawn = false
|
||||
local partial_respawn = false
|
||||
if not HOGGIT.GroupIsAlive(grp) then
|
||||
if mist.groupIsDead(grp) then
|
||||
needs_respawn = true
|
||||
HOGGIT.debug_text("THEY DEAD, RESPAWNIN", 10)
|
||||
elseif spawner:GetPartialDeathThresholdPercent() then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user