diff options
author | tpart <tpart120@proton.me> | 2024-07-18 15:58:35 +0200 |
---|---|---|
committer | tpart <tpart120@proton.me> | 2024-07-18 15:58:42 +0200 |
commit | 2a09cbcca6ce29fbf6d837c5a220a0cbf1d6b70e (patch) | |
tree | bf26274c649dd25171da4ae7c75bebbc90eaf742 /client/multiplayer.gd | |
parent | 43ec84308b4de2cbb51cdefc57d637edbda4ed2d (diff) | |
download | hurrycurry-2a09cbcca6ce29fbf6d837c5a220a0cbf1d6b70e.tar hurrycurry-2a09cbcca6ce29fbf6d837c5a220a0cbf1d6b70e.tar.bz2 hurrycurry-2a09cbcca6ce29fbf6d837c5a220a0cbf1d6b70e.tar.zst |
Fix movement code in client to match new protocol; Bump protocol version to 2.0
Diffstat (limited to 'client/multiplayer.gd')
-rw-r--r-- | client/multiplayer.gd | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/multiplayer.gd b/client/multiplayer.gd index d3e80613..d40c00d7 100644 --- a/client/multiplayer.gd +++ b/client/multiplayer.gd @@ -54,7 +54,7 @@ signal server_message(text: String) signal replay_start() signal connection_closed(reason: String) -const VERSION_MAJOR: int = 1 +const VERSION_MAJOR: int = 2 const VERSION_MINOR: int = 0 var connected := false @@ -264,11 +264,11 @@ func send_join(player_name: String, character: int): "character": character }) -func send_position(pos: Vector2, rotation: float, boosting: bool): +func send_movement(pos: Vector2, direction: Vector2, boosting: bool): send_packet({ - "type": "position", + "type": "movement", "pos": [pos.x, pos.y], - "rot": rotation, + "direction": [direction.x, direction.y], "boosting": boosting }) |