FSA counter workaround for questions without time
This commit is contained in:
parent
bcbf149c6c
commit
6cdf7dbb4d
|
@ -12,7 +12,8 @@ function updateFSATeamCountTroll() {
|
||||||
return
|
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 timeratio = 1 - (state.submitTimer / time)
|
||||||
var slowAnswerChance = Math.random()*2*Math.pow(timeratio, 2)
|
var slowAnswerChance = Math.random()*2*Math.pow(timeratio, 2)
|
||||||
var quickAnswerChance = (Math.random()+Math.sqrt(69/time))/3
|
var quickAnswerChance = (Math.random()+Math.sqrt(69/time))/3
|
||||||
|
|
Loading…
Reference in New Issue