Fix join logic in menu panel
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user