Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 597d6dde2d | |||
| aad186552c |
@@ -142,10 +142,9 @@ signal on_panic(offset: float)
|
||||
func start() -> void:
|
||||
if _active:
|
||||
return
|
||||
|
||||
_clock.set_time(0.)
|
||||
|
||||
if not multiplayer.is_server():
|
||||
_clock.set_time(0.)
|
||||
_active = true
|
||||
_sample_idx = 0
|
||||
_sample_buffer = _RingBuffer.new(sync_samples)
|
||||
|
||||
@@ -73,8 +73,15 @@ func _handle_host():
|
||||
round_manager.start_match()
|
||||
|
||||
func _handle_new_peer(id: int):
|
||||
# On a dedicated server, peer 1 (the server process) has no avatar.
|
||||
# When a client connects, it receives on_peer_join for peer 1, but
|
||||
# should skip spawning because the server doesn't have that avatar.
|
||||
# This also applies to listen-server: the server replicates peer 1's
|
||||
# avatar to clients; spawning a local copy would duplicate it.
|
||||
if id == 1 and not multiplayer.is_server():
|
||||
print("[PlayerSpawner] Client skipping spawn for peer 1 (server has no dedicated avatar)")
|
||||
return
|
||||
if _dedicated_server and id == 1:
|
||||
# Peer 1 is the server itself — no avatar needed
|
||||
return
|
||||
if id == 1 and not spawn_host_avatar:
|
||||
print("[PlayerSpawner] Skipping spawn for peer 1 (spawn_host_avatar=false)")
|
||||
|
||||
@@ -34,7 +34,7 @@ text = "Address:"
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
text = "localhost"
|
||||
text = "192.168.0.127"
|
||||
|
||||
[node name="Port Label" type="Label" parent="LAN/Address Row"]
|
||||
layout_mode = 2
|
||||
@@ -44,7 +44,7 @@ text = "Port:"
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
text = "16384"
|
||||
text = "34197"
|
||||
|
||||
[node name="Actions Row" type="HBoxContainer" parent="LAN"]
|
||||
layout_mode = 2
|
||||
|
||||
Reference in New Issue
Block a user