aboutsummaryrefslogtreecommitdiff
path: root/client/multiplayer.gd
diff options
context:
space:
mode:
authortpart <tpart@noreply.codeberg.org>2026-01-15 21:57:05 +0100
committertpart <tpart@noreply.codeberg.org>2026-01-15 21:57:05 +0100
commit732026eee6f72ba3af5aef25644afb37a88c542d (patch)
tree081072d7f00c777d5a3f72b8a2ddde76abf2e3e6 /client/multiplayer.gd
parentfa5ece0abdf0ecca256e7c99d91ac248c1f45820 (diff)
parent79910a55f7b6a952b05bfb7d1e8317036ae44207 (diff)
downloadhurrycurry-732026eee6f72ba3af5aef25644afb37a88c542d.tar
hurrycurry-732026eee6f72ba3af5aef25644afb37a88c542d.tar.bz2
hurrycurry-732026eee6f72ba3af5aef25644afb37a88c542d.tar.zst
Merge pull request 'Player prediction' (#548) from tpart/hurrycurry:master into master
Reviewed-on: https://codeberg.org/hurrycurry/hurrycurry/pulls/548
Diffstat (limited to 'client/multiplayer.gd')
-rw-r--r--client/multiplayer.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/multiplayer.gd b/client/multiplayer.gd
index d5d31322..a0260df5 100644
--- a/client/multiplayer.gd
+++ b/client/multiplayer.gd
@@ -107,7 +107,7 @@ func fix_packet_types(val):
for k in val.keys():
if typeof(val[k]) == TYPE_ARRAY and val[k].size() == 2 and typeof(val[k][0]) == TYPE_FLOAT and typeof(val[k][1]) == TYPE_FLOAT:
if k in ["tile"]: newval[k] = Vector2i(val[k][0], val[k][1])
- elif k in ["pos", "position"]: newval[k] = Vector2(val[k][0], val[k][1])
+ elif k in ["pos", "position", "dir"]: newval[k] = Vector2(val[k][0], val[k][1])
else: newval[k] = val[k]
# TODO reenable when fixed
# elif k in ["player", "id"] and typeof(val[k]) == TYPE_FLOAT:
@@ -148,6 +148,7 @@ func send_movement(player, pos: Vector2, direction: Vector2, boost: bool):
"dir": [direction.x, direction.y],
"boost": boost
})
+
func send_tile_interact(player, pos: Vector2i, edge: bool, hand: int):
@warning_ignore("incompatible_ternary")