mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-14 10:13:13 +02:00
Merge pull request #735 from linaori/stricter-cause-check
Check if the cause is valid and has a force for hydra spawns
This commit is contained in:
commit
d178ba7eae
@ -72,7 +72,7 @@ Event.add(defines.events.on_entity_died, function (event)
|
||||
local spawned = create_entity({name = hydra_spawn, force = force, position = position})
|
||||
if spawned and spawned.type == 'unit' then
|
||||
spawned.set_command(command)
|
||||
elseif spawned and cause then
|
||||
elseif spawned and cause and cause.valid and cause.force then
|
||||
spawned.shooting_target = cause
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user