sevivon

[DORMANT] multiplayer dreidel game for mobile devices w/ godot
git clone git://git.figbert.com/sevivon.git
Log | Files | Refs | README | LICENSE

commit 0ba213b2dd020e4b57a0389e3cc7c7b933a65645
parent cc4271403bc0daa3728a9543140492a243d6050a
Author: FIGBERT <figbert@figbert.com>
Date:   Sat, 30 Jan 2021 23:28:16 -0800

Check if peer joining is server on client

Diffstat:
Msrc/scripts/main.gd | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/scripts/main.gd b/src/scripts/main.gd @@ -30,14 +30,14 @@ func _initalize_instance() -> void: func _peer_joined(id: int) -> void: if get_tree().is_network_server(): print("%s joined successfully" % id) - elif id != get_tree().get_network_unique_id(): + elif id != get_tree().get_network_unique_id() and id != 1: $Label.text += "%s has joined the lobby\n" % id func _peer_left(id: int) -> void: if get_tree().is_network_server(): print("%s disconnected from the server" % id) - elif id != get_tree().get_network_unique_id(): + elif id != get_tree().get_network_unique_id() and id != 1: $Label.text += "%s has left the lobby\n" % id