Browse Source

Assume something went wrong if nip granting too large

spaghetti 7 years ago
parent
commit
da82a9464b
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      sections/schedule/hourly/bonus_points.php

+ 1
- 0
sections/schedule/hourly/bonus_points.php View File

@@ -23,6 +23,7 @@ if ($DB->has_results()) {
23 23
   $QueryPart = '';
24 24
   while (list($UserID, $NumTorr, $TSize, $TTime, $TSeeds) = $DB->next_record()) {
25 25
     $Points = intval((0.5 + (0.55*($NumTorr * (sqrt(($TSize/$NumTorr)/1073741824) * pow(1.5,($TTime/$NumTorr)/(24*365))))) / (max(1, sqrt(($TSeeds/$NumTorr)+4)/3)))**0.95);
26
+    if ($Points > 100000) $Points = 0;
26 27
     $QueryPart .= "WHEN $UserID THEN BonusPoints+$Points ";
27 28
     $Cache->delete_value('user_info_heavy_'.$UserID);
28 29
   }

Loading…
Cancel
Save