Remove AI multiplayer

This commit is contained in:
JonShard
2026-07-29 10:57:35 +02:00
parent ea492f914b
commit 0f1f0c6a93
102 changed files with 1146 additions and 960 deletions
+5 -5
View File
@@ -28,8 +28,8 @@ func _process(delta: float) -> void:
# them and the blink below toggled `visible` locally, so the same item was
# shown on one peer and hidden on the other. Non-owners just follow the
# server, which removes the item for everyone when its time is up.
if not NetworkManager.owns_world():
return
# if not NetworkManager.owns_world():
# return
# 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):
@@ -42,7 +42,7 @@ func _process(delta: float) -> void:
_time_left -= delta
if _time_left <= 0:
print("DespawningItem despawning!" , get_parent())
NetworkManager.despawn_item(get_parent())
get_parent().queue_free()
# Stop counting: despawn_item() only queues the free, so without this we
# keep re-reporting the same item every frame until it actually goes.
set_process(false)
@@ -56,8 +56,8 @@ func _process(delta: float) -> void:
# `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():
func _set_visible(value: bool) -> void: # TODO: Fix blinking
if true:# NetworkManager.is_online():
get_parent().visible = true
return
get_parent().visible = value