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, 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)