summaryrefslogtreecommitdiff
path: root/Network/Network.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2023-12-25 00:21:50 +0100
committerDaniel Weipert <git@mail.dweipert.de>2023-12-25 00:21:50 +0100
commit0bfda86c29d106df5fa3dd16d925c193b3f726c7 (patch)
tree7d248694a63c346f5e82510b50405e34f8d5afe5 /Network/Network.gd
parent09794cc76678247592ceb4e8b37e1ab129356466 (diff)
UI + HUD alignmentv2.0.0
Diffstat (limited to 'Network/Network.gd')
-rw-r--r--Network/Network.gd6
1 files changed, 1 insertions, 5 deletions
diff --git a/Network/Network.gd b/Network/Network.gd
index 0b3e379..ff076a4 100644
--- a/Network/Network.gd
+++ b/Network/Network.gd
@@ -14,8 +14,7 @@ const PORT = 10567
const MAX_PEERS = 2
-var peer = null
-var ip = null
+var peer: ENetMultiplayerPeer = null
var player = {
idx = 0,
@@ -59,7 +58,6 @@ func host_game(player_name):
self.peer = ENetMultiplayerPeer.new()
self.peer.create_server(self.PORT, self.MAX_PEERS)
multiplayer.multiplayer_peer = self.peer
- #get_tree().set_multiplayer_peer(self.peer)
func join_game(ip, player_name):
@@ -67,13 +65,11 @@ func join_game(ip, player_name):
self.peer = ENetMultiplayerPeer.new()
self.peer.create_client(ip, self.PORT)
multiplayer.multiplayer_peer = self.peer
- #get_tree().set_multiplayer_peer(self.peer)
func leave_game():
rpc("_leave_game")
multiplayer.multiplayer_peer = null
- #get_tree().set_multiplayer_peer(null)
@rpc("any_peer") func _leave_game():