From 275c4772d0f56c11ab10fe9387dd5135922b2ae1 Mon Sep 17 00:00:00 2001 From: choelzl Date: Wed, 9 Feb 2022 21:37:26 +0100 Subject: [PATCH] WIP --- twitch/chatguessr.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/twitch/chatguessr.js b/twitch/chatguessr.js index 4de7c7d..619f040 100644 --- a/twitch/chatguessr.js +++ b/twitch/chatguessr.js @@ -92,14 +92,14 @@ function addGuess(user,position) { if(seed.round == undefined) return; - let current_round = ""+seed.round; + var current_round = ""+seed.round; if(guesses[current_round]==undefined) guesses[current_round] = [] if(guesses[current_round].some((v)=>v.user==user)) return; if(!isCoordinates(position)) return; - let pos = toPos(position) - let distance = haversineDistance(pos, {lat:seed.rounds[current_round].lat,lon:seed.rounds[current_round].lon}) + var pos = toPos(position) + var distance = haversineDistance(pos, {lat:seed.rounds[current_round].lat,lon:seed.rounds[current_round].lon}) - let score = calculateScore(distance, scale) + var score = calculateScore(distance, scale) guesses[current_round].push({ user:user, location:location,