aboutsummaryrefslogtreecommitdiff
path: root/test-client
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-06-27 11:52:56 +0200
committermetamuffin <metamuffin@disroot.org>2024-06-27 11:52:56 +0200
commit7df63d3b92d552d9c51f718307e52a681cc827ac (patch)
treee3c1068a1c8cd8887ee81ac3f0daed3997140d91 /test-client
parent8895fc5a00e638b9260cc07749085b8c9f4e0459 (diff)
downloadhurrycurry-7df63d3b92d552d9c51f718307e52a681cc827ac.tar
hurrycurry-7df63d3b92d552d9c51f718307e52a681cc827ac.tar.bz2
hurrycurry-7df63d3b92d552d9c51f718307e52a681cc827ac.tar.zst
movement correction doesnt work well when respawning
Diffstat (limited to 'test-client')
-rw-r--r--test-client/main.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/test-client/main.ts b/test-client/main.ts
index b0b492ce..a572614b 100644
--- a/test-client/main.ts
+++ b/test-client/main.ts
@@ -139,9 +139,10 @@ function packet(p: PacketC) {
case "position": {
const pl = players.get(p.player)!
const pos = { x: p.pos[0], y: p.pos[1] }
- const dist = length(sub_v2(pl.position, pos));
+ // const dist = length(sub_v2(pl.position, pos));a
// TODO this is actually not a good idea if latency is too high
- if (p.player == my_id && dist < 3) return; // we know better where we are
+ // if (p.player == my_id && dist < 3) return; // we know better where we are
+ if (p.player == my_id) return
pl.position.x = pos.x
pl.position.y = pos.y
pl.rot = p.rot