mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Optimized GetWeightedPoints to only update users with records. (#758)
This commit is contained in:
parent
463b8a857b
commit
b1106d7c97
@ -787,8 +787,8 @@ void UpdateAllPoints()
|
||||
#endif
|
||||
|
||||
char sQuery[128];
|
||||
FormatEx(sQuery, 128, "UPDATE %susers SET points = GetWeightedPoints(auth);",
|
||||
gS_MySQLPrefix);
|
||||
FormatEx(sQuery, 128, "UPDATE %susers SET points = GetWeightedPoints(auth) WHERE auth IN (SELECT auth FROM %splayertimes GROUP BY auth);",
|
||||
gS_MySQLPrefix, gS_MySQLPrefix);
|
||||
|
||||
gH_SQL.Query(SQL_UpdateAllPoints_Callback, sQuery);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user