Fix join logic in menu panel

This commit is contained in:
JonShard
2026-07-29 14:45:09 +02:00
parent 68b6d4d1dc
commit dce694dac4
4 changed files with 30 additions and 51 deletions
+2 -12
View File
@@ -34,7 +34,7 @@ func _process(delta: float) -> void:
# if we're held or moving, reset timer and return
if _pickable.get_picked_up_by() or _rigid.linear_velocity.length_squared() > pow(minimum_speed_square,2):
_time_left = time_to_despawn
_set_visible(true)
get_parent().visible(true)
return
@@ -50,14 +50,4 @@ func _process(delta: float) -> void:
# Make item blink in and out before despawning
if _time_left < time_to_despawn / 2:
_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: # TODO: Fix blinking
if true:# NetworkManager.is_online():
get_parent().visible = true
return
get_parent().visible = value
get_parent().visible(int(_time_left * 5.0) % 2 == 0)