FSA counter workaround for questions without time

This commit is contained in:
Oskar Winkels 2021-01-23 11:16:32 +01:00
parent bcbf149c6c
commit 6cdf7dbb4d
1 changed files with 2 additions and 1 deletions

View File

@ -12,7 +12,8 @@ function updateFSATeamCountTroll() {
return
}
var time = state.questions[state.currentQuestion].time
// `|| state.submitTime` is a workaround for saved Qs that don't have a time set yet
var time = state.questions[state.currentQuestion].time || state.submitTime
var timeratio = 1 - (state.submitTimer / time)
var slowAnswerChance = Math.random()*2*Math.pow(timeratio, 2)
var quickAnswerChance = (Math.random()+Math.sqrt(69/time))/3