Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4c55a3
commit bbd62e8
Showing
1 changed file
with
26 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -290,27 +290,39 @@ def sort(self): | |
def server_points(server): | ||
points = 0 | ||
|
||
# 1 per client | ||
# Only 1/16 per client with a guest or all-numeric name | ||
for name in server["clients_list"]: | ||
if name.startswith("Guest") or \ | ||
name.isdigit(): | ||
points += 1/16 | ||
else: | ||
points += 1 | ||
# 1 per client, but only 1/8 per client with a guest | ||
# or all-numeric name. | ||
if "clients_list" in server: | ||
for name in server["clients_list"]: | ||
if name.startswith("Guest") or \ | ||
name.isdigit(): | ||
points += 1/8 | ||
else: | ||
points += 1 | ||
else: | ||
# Old server | ||
points = server["clients"] / 4 | ||
|
||
# Penalize highly loaded servers to improve player distribution. | ||
# Note: This doesn't just make more than 16 players stop | ||
# increasing your points, it can actually reduce your points | ||
# if you have guests/all-numerics. | ||
if server["clients"] > 16: | ||
points = server["clients"] - 16 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ShadowNinja
Author
Member
|
||
|
||
# 1/2 per month of age, limited to 2 | ||
points += min(2, server["game_time"] / (60*60*24*30) * (1/2)) | ||
# 1 per month of age, limited to 8 | ||
points += min(8, server["game_time"] / (60*60*24*30)) | ||
|
||
# 1/8 per average client, limited to 1 | ||
points += min(1, server["pop_v"] * (1/8)) | ||
# 1/2 per average client, limited to 4 | ||
points += min(4, server["pop_v"] / 2) | ||
|
||
# -8 for unrealistic max_clients | ||
if server["clients_max"] >= 128: | ||
points -= 8 | ||
|
||
# -6 per second of ping | ||
points -= server["ping"] * 6 | ||
# -8 per second of ping over 0.4s | ||
if server["ping"] > 0.4: | ||
points -= (server["ping"] - 0.4) * 8 | ||
|
||
# Up to -8 for less than an hour of uptime (penalty linearly decreasing) | ||
HOUR_SECS = 60 * 60 | ||
|
1 comment
on commit bbd62e8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for inflict those penalties 👍 Although "just test" server is still enthroned on top of the list...
This should perhaps be points = 16 (It is realistic for just test to have > 32 players). Also, I dont see how it can reduce points.