summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-09-20 22:21:46 +0200
committertpart <tpart120@proton.me>2024-09-20 22:21:46 +0200
commitf2836d359942a6b42b1db9d1fd7624499798d925 (patch)
treef4f947589b7ec7e77baffb19c688b4d4da765c4d
parent903bb30d48cd6f993fc404d3602da994a6f8885a (diff)
downloadhurrycurry-f2836d359942a6b42b1db9d1fd7624499798d925.tar
hurrycurry-f2836d359942a6b42b1db9d1fd7624499798d925.tar.bz2
hurrycurry-f2836d359942a6b42b1db9d1fd7624499798d925.tar.zst
Prevent player duplication bug (Fixes #141)
-rw-r--r--client/game.gd3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/game.gd b/client/game.gd
index c86906b6..be2acd70 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -303,6 +303,9 @@ func handle_packet(p):
_: push_error("Unrecognized packet type: %s" % p.type)
func join():
+ if join_sent:
+ push_error("Join was already sent. Tried to join twice.")
+ return
join_sent = true
mp.send_join(Global.get_profile("username"), Global.get_profile("character"))