This commit is contained in:
choelzl 2022-02-14 15:28:18 +01:00
parent 14a4ca4efd
commit 4307d576a5
Signed by: sora
GPG Key ID: A362EA0491E2EEA0

View File

@ -115,7 +115,7 @@
guesses.rounds = seed.rounds; guesses.rounds = seed.rounds;
$.panelsocketserver.sendJSONToAll(JSON.stringify({ $.panelsocketserver.sendJSONToAll(JSON.stringify({
'eventFamily': 'chatguessr', 'eventFamily': 'chatguessr',
'eventType': 'guesse', 'eventType': 'guesses',
'data': JSON.stringify(guesses) 'data': JSON.stringify(guesses)
})); }));
} }
@ -149,7 +149,7 @@
}else if(action.equalsIgnoreCase('refresh')){ }else if(action.equalsIgnoreCase('refresh')){
if(seed.token == undefined) return; if(seed.token == undefined) return;
var newseed = fetchSeed(seed.token); var newseed = fetchSeed(seed.token);
if(newseed.round > seed.round){ if(newseed.player.guesses > seed.round){
$.setIniDbBoolean('chatguessr', 'isOpen',false) //NEW ROUND /Score $.setIniDbBoolean('chatguessr', 'isOpen',false) //NEW ROUND /Score
var gp = newseed.player.guesses[seed.round - 1].lat+","+newseed.player.guesses[seed.round - 1].lng var gp = newseed.player.guesses[seed.round - 1].lat+","+newseed.player.guesses[seed.round - 1].lng
addGuess($.channelName,gp); addGuess($.channelName,gp);