aboutsummaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test-client/main.ts')
-rw-r--r--test-client/main.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/test-client/main.ts b/test-client/main.ts
index b0b492ce..4d1e9c53 100644
--- a/test-client/main.ts
+++ b/test-client/main.ts
@@ -19,7 +19,7 @@
import { MovementBase, update_movement } from "./movement.ts";
import { Gamedata, ItemIndex, Message, PacketC, PacketS, PlayerID, TileIndex } from "./protocol.ts";
-import { V2, add_v2, lerp_exp_v2_mut, normalize, lerp_exp, sub_v2, length } from "./util.ts";
+import { V2, add_v2, lerp_exp_v2_mut, normalize, lerp_exp } from "./util.ts";
import { draw_ingame, draw_wait } from "./visual.ts";
const KEY_INTERACT = "KeyJ"
@@ -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