mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
fix deserialize being broken and spawning projectiles from enemys at 0,0 seemingly
This commit is contained in:
parent
be463d5019
commit
9f42476ae1
1 changed files with 5 additions and 1 deletions
|
@ -302,7 +302,11 @@ end
|
|||
|
||||
function util.deserialize_entity(ent_data, x, y)
|
||||
local ent = EntityCreateNew()
|
||||
np.DeserializeEntity(ent, ent_data, x, y)
|
||||
if x == nil or y == nil then
|
||||
np.DeserializeEntity(ent, ent_data)
|
||||
else
|
||||
np.DeserializeEntity(ent, ent_data, x, y)
|
||||
end
|
||||
if EntityGetFirstComponentIncludingDisabled(ent, "WorldStateComponent") ~= nil then
|
||||
error("Tried to deserialize WorldStateEntity. The world is screwed.")
|
||||
EntityKill(ent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue