mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
fix some end screen errors
This commit is contained in:
parent
1f344d43e5
commit
6a25907375
2 changed files with 5 additions and 2 deletions
|
@ -387,10 +387,10 @@ function player_fns.serialize_position(player_data)
|
|||
end
|
||||
|
||||
function player_fns.deserialize_position(message, player_data)
|
||||
local entity = player_data.entity
|
||||
if not EntityGetIsAlive(entity) then
|
||||
if player_data == nil or not EntityGetIsAlive(player_data.entity) then
|
||||
return
|
||||
end
|
||||
local entity = player_data.entity
|
||||
local character_data = EntityGetFirstComponentIncludingDisabled(entity, "CharacterDataComponent")
|
||||
local velocity_comp = EntityGetFirstComponentIncludingDisabled(entity, "VelocityComponent")
|
||||
local platforming_comp = EntityGetFirstComponentIncludingDisabled(entity, "CharacterPlatformingComponent")
|
||||
|
|
|
@ -43,6 +43,9 @@ function module.on_should_send_updates()
|
|||
end
|
||||
|
||||
local function update_essences_on(player_data)
|
||||
if not EntityGetIsAlive(player_data.entity) then
|
||||
return
|
||||
end
|
||||
local essence_effects = EntityGetAllChildren(player_data.entity, "essence_effect") or {}
|
||||
for _, essence in ipairs(essence_effects) do
|
||||
EntityRemoveFromParent(essence)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue