From 4a8d5b879ebb1b947478d039b8dc403bcdf443f8 Mon Sep 17 00:00:00 2001 From: JonShard Date: Sun, 16 Aug 2026 10:35:20 +0200 Subject: [PATCH] Fix despawning items not blinking --- Net/net_pickable.gd | 2 +- Prefabs/despawning_item.gd | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Net/net_pickable.gd b/Net/net_pickable.gd index 846894b..b67ee0e 100644 --- a/Net/net_pickable.gd +++ b/Net/net_pickable.gd @@ -45,7 +45,7 @@ func _ready() -> void: # Configure Multiplayer Synchronizer # This overwrites any changes made in the inspector. replication_config = SceneReplicationConfig.new() - var properties: Array[NodePath] = [".:position", ".:quaternion", ".:enabled"] + var properties: Array[NodePath] = [".:position", ".:quaternion", ".:enabled", ".:visible"] for property_path in properties: replication_config.add_property(property_path) replication_config.property_set_replication_mode(property_path, SceneReplicationConfig.REPLICATION_MODE_ALWAYS) diff --git a/Prefabs/despawning_item.gd b/Prefabs/despawning_item.gd index e5b3b49..6a3effe 100644 --- a/Prefabs/despawning_item.gd +++ b/Prefabs/despawning_item.gd @@ -58,11 +58,7 @@ func _process(delta: float) -> void: _set_visible(int(_time_left * 5.0) % 2 == 0) -# `visible` is not a replicated property, so a blink driven only here would make -# the item flicker on the host and stay solid on clients. Until it is synced, -# only warn when there is nobody else to disagree with. func _set_visible(value: bool) -> void: - if NetworkManager.is_online(): - get_parent().visible = true + if not NetworkManager.owns_world(): return get_parent().visible = value