From a18d03d2e11a06215ee0cb411583ff98cdfdf4dd Mon Sep 17 00:00:00 2001 From: IQuant Date: Thu, 14 Nov 2024 23:56:34 +0300 Subject: [PATCH] Emphemerial no crashy --- quant.ew/files/system/enemy_sync.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/quant.ew/files/system/enemy_sync.lua b/quant.ew/files/system/enemy_sync.lua index 804e0866..678c8991 100644 --- a/quant.ew/files/system/enemy_sync.lua +++ b/quant.ew/files/system/enemy_sync.lua @@ -508,11 +508,7 @@ local function sync_enemy(enemy_info_raw, force_no_cull) goto continue end local enemy_id - if not_ephemerial then - enemy_id = EntityLoad(filename, x, y) - else - enemy_id = util.load_ephemerial(filename, x, y) - end + enemy_id = EntityLoad(filename, x, y) spawned_by_us[enemy_id] = true EntityAddTag(enemy_id, "ew_replicated") EntityAddTag(enemy_id, "polymorphable_NOT") @@ -556,6 +552,10 @@ local function sync_enemy(enemy_info_raw, force_no_cull) ComponentAddTag(sprite, "ew_sprite") ComponentRemoveTag(sprite, "character") end + + if not not_ephemerial then + util.make_ephemerial(enemy_id) + end end local enemy_data_new = ctx.entity_by_remote_id[remote_enemy_id]