fix notplayer throwing water at newly revived players

This commit is contained in:
bgkillas 2024-09-22 09:25:47 -04:00
parent 7ba48e1d27
commit fefaf0ed79

View file

@ -205,16 +205,9 @@ local function has_pheremoned(entity)
end end
local function has_ambrosia(entity) local function has_ambrosia(entity)
for _, ent in ipairs(EntityGetAllChildren(entity) or {}) do local com = EntityGetFirstComponentIncludingDisabled(entity, "StatusEffectDataComponent")
local com = EntityGetFirstComponent(ent, "GameEffectComponent") local stains = ComponentGetValue2(com, "stain_effects")
if com ~= nil then return stains[24] ~= nil and stains[24] >= 0.15
local name = ComponentGetValue2(com, "effect")
if name == "PROTECTION_ALL" then
return true
end
end
end
return false
end end
local function needs_douse(entity) local function needs_douse(entity)