diff options
author | metamuffin <metamuffin@disroot.org> | 2025-05-30 16:01:53 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-05-30 16:01:53 +0200 |
commit | bce6d2495b137ae3fe6b3787986dd6787a551f87 (patch) | |
tree | 101bd6b6db7ec4d18fcde6158bb8d472b82f5a8a /test-client | |
parent | b19e638013fea591cb942c16648a5b33283491f9 (diff) | |
download | hurrycurry-bce6d2495b137ae3fe6b3787986dd6787a551f87.tar hurrycurry-bce6d2495b137ae3fe6b3787986dd6787a551f87.tar.bz2 hurrycurry-bce6d2495b137ae3fe6b3787986dd6787a551f87.tar.zst |
test-client: restore old interact target behaviour. new behav is opt-in
Diffstat (limited to 'test-client')
-rw-r--r-- | test-client/main.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test-client/main.ts b/test-client/main.ts index 946b933e..f52e7f40 100644 --- a/test-client/main.ts +++ b/test-client/main.ts @@ -377,6 +377,13 @@ export function get_interact_target(): V2 | undefined { if (interacting) return interacting const me = players.get(my_id) if (!me) return + + if (location.hash.search("newinteract") == -1) + return { + x: Math.floor(me.position.x + Math.sin(me.rot)), + y: Math.floor(me.position.y + Math.cos(me.rot)) + } + const rx = me.position.x + Math.sin(me.rot) * 0.7 const ry = me.position.y + Math.cos(me.rot) * 0.7 const bx = Math.floor(rx) |