summaryrefslogtreecommitdiff
path: root/Network/Network.gd
diff options
context:
space:
mode:
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():