T201704101138
This commit is contained in:
@@ -60,7 +60,7 @@ if($uid == '') {
|
||||
}
|
||||
$old_high = $db->query('SELECT "score" FROM "Highscores" WHERE "Users_ID" = $1 AND "Categories_ID" = $2',
|
||||
array($uid, $cid))['data'][0]['score'];
|
||||
$new_high = round($old_high * 0.95 + $score * 0.05);
|
||||
$new_high = $old_high == 0 ? $score : round($old_high * 0.95 + $score * 0.05);
|
||||
$db->query('UPDATE "Highscores" SET "score" = $1 WHERE "Users_ID" = $2 AND "Categories_ID" = $3',
|
||||
array($new_high, $uid, $cid));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user