diff --git a/plugins/inventory_sync/module/inventory_sync.lua b/plugins/inventory_sync/module/inventory_sync.lua index cf4305b5..ca452d4c 100644 --- a/plugins/inventory_sync/module/inventory_sync.lua +++ b/plugins/inventory_sync/module/inventory_sync.lua @@ -116,11 +116,6 @@ function inventory_sync.deserialize_player(player, finished_record) -- Restore player position and driving state restore_position(player, finished_record) - -- Return to remote if needed (restore position may exit remote view) - if serialized_player.remote then - player.set_controller{ type = defines.controllers.remote } - end - -- Transfer items from stashed inventory if stashed_corpse then local stash = stashed_corpse.get_inventory(defines.inventory.character_corpse) diff --git a/plugins/inventory_sync/module/serialize.lua b/plugins/inventory_sync/module/serialize.lua index e7b7db63..567289d0 100644 --- a/plugins/inventory_sync/module/serialize.lua +++ b/plugins/inventory_sync/module/serialize.lua @@ -429,7 +429,6 @@ end --- @field generation number --- @field name string --- @field controller string ---- @field remote boolean --- @field color Color --- @field chat_color Color --- @field tag string @@ -452,7 +451,6 @@ function serialize.serialize_player(player, failed_deserialization) local serialized = { generation = 0, -- Gets replaced later controller = controller_to_name[player.controller_type], - remote = false, name = player.name, color = player.color, chat_color = player.chat_color, @@ -463,8 +461,8 @@ function serialize.serialize_player(player, failed_deserialization) ticks_to_respawn = player.ticks_to_respawn, } + -- In 2.0 we want to sync the physical controller to ignore remote view if v2_remote_controller then - serialized.remote = player.controller_type == defines.controllers.remote serialized.controller = controller_to_name[player.physical_controller_type] end @@ -637,11 +635,6 @@ function serialize.deserialize_player(player, serialized) serialize.deserialize_crafting_notifications(player, serialized.recipe_notifications) end - -- Return to remote view after physical controller has been synced - if serialized.remote then - player.set_controller{ type = defines.controllers.remote } - end - return next(failed_deserialization) and failed_deserialization or nil end