1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-22 03:38:48 +02:00

validate if entity is valid before do_splash_damage

This commit is contained in:
Gerkiz 2020-04-18 12:59:16 +02:00
parent 00e1f84dad
commit f50351bb1e

View File

@ -56,6 +56,7 @@ local function do_splash_damage_around_entity(source_entity, player)
}
local entities = source_entity.surface.find_entities_filtered({area = splash_area})
for _, entity in pairs(entities) do
if not entity.valid then return end
if entity.health and entity ~= source_entity and entity ~= player then
if additional_visual_effects then
local surface = entity.surface