mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
fix enemy spawning enemys on clients oddly
This commit is contained in:
parent
b8d4adf809
commit
8d2b965b0a
1 changed files with 8 additions and 0 deletions
|
@ -489,6 +489,14 @@ function rpc.handle_enemy_data(enemy_data)
|
|||
ComponentSetValue2(phys_component, "destroy_body_if_entity_destroyed", true)
|
||||
end
|
||||
end
|
||||
|
||||
for _, com in ipairs(EntityGetComponent(enemy_id, "LuaComponent") or {}) do
|
||||
local script = ComponentGetValue2(com, "script_damage_received")
|
||||
if script ~= nil and (script == "data/scripts/animals/leader_damage.lua" or script == "data/scripts/animals/giantshooter_death.lua") then
|
||||
EntityRemoveComponent(enemy_id, com)
|
||||
end
|
||||
end
|
||||
|
||||
-- Make sure stuff doesn't decide to explode on clients by itself.
|
||||
local expl_component = EntityGetFirstComponent(enemy_id, "ExplodeOnDamageComponent")
|
||||
if expl_component ~= nil and expl_component ~= 0 then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue