From 0af8d4d42c264b6279e5f70b60ff1df21a407f26 Mon Sep 17 00:00:00 2001 From: Leander Date: Tue, 2 May 2017 13:43:21 +0200 Subject: [PATCH] score multiplyer limited to .25 --- answer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/answer.php b/answer.php index 0b2c925..ebae4e0 100644 --- a/answer.php +++ b/answer.php @@ -188,7 +188,8 @@ if($uid == '') { array($uid) )['data'][0]['answered_questions']; $new_points = round($new_points / $answered_questions); - $score_multiplyer = 0.005 * $answered_questions; + $score_multiplyer = (0.005 * $answered_questions < 0.25) ? + 0.005 * $answered_questions : 0.25; $new_user_high = $old_user_high == 0 ? $new_points : round( $old_user_high * (1 - $score_multiplyer)