mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
fix blob spawning stuff still, fix enemys not bleeding on clients~
This commit is contained in:
parent
8d2b965b0a
commit
3ec3e478d2
1 changed files with 7 additions and 8 deletions
|
@ -471,7 +471,13 @@ function rpc.handle_enemy_data(enemy_data)
|
|||
spawned_by_us[enemy_id] = true
|
||||
EntityAddTag(enemy_id, "ew_replicated")
|
||||
EntityAddTag(enemy_id, "polymorphable_NOT")
|
||||
EntityAddComponent2(enemy_id, "LuaComponent", {_tags="ew_immortal", script_damage_about_to_be_received = "mods/quant.ew/files/resource/cbs/immortal.lua"})
|
||||
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" or script == "data/scripts/animals/blob_damage.lua") then
|
||||
EntityRemoveComponent(enemy_id, com)
|
||||
end
|
||||
end
|
||||
--EntityAddComponent2(enemy_id, "LuaComponent", {_tags="ew_immortal", script_damage_about_to_be_received = "mods/quant.ew/files/resource/cbs/immortal.lua"})
|
||||
local damage_component = EntityGetFirstComponentIncludingDisabled(enemy_id, "DamageModelComponent")
|
||||
if damage_component and damage_component ~= 0 then
|
||||
ComponentSetValue2(damage_component, "wait_for_kill_flag_on_death", true)
|
||||
|
@ -490,13 +496,6 @@ function rpc.handle_enemy_data(enemy_data)
|
|||
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