summaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-05-30 16:01:53 +0200
committermetamuffin <metamuffin@disroot.org>2025-05-30 16:01:53 +0200
commitbce6d2495b137ae3fe6b3787986dd6787a551f87 (patch)
tree101bd6b6db7ec4d18fcde6158bb8d472b82f5a8a /test-client/main.ts
parentb19e638013fea591cb942c16648a5b33283491f9 (diff)
downloadhurrycurry-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/main.ts')
-rw-r--r--test-client/main.ts7
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)