Skip to content

Commit e7c4d2c

Browse files
committedOct 27, 2018
Tune server ranking
1 parent 67d8515 commit e7c4d2c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

Diff for: ‎server.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,12 @@ def server_points(server):
331331
points = server["clients"] / 4
332332

333333
# Penalize highly loaded servers to improve player distribution.
334-
# Note: This doesn't just make more than 16 players stop
334+
# Note: This doesn't just make more than 90% of max players stop
335335
# increasing your points, it can actually reduce your points
336336
# if you have guests.
337-
if server["clients"] > 16:
338-
points -= server["clients"] - 16
337+
cap = int(server["clients_max"] * 0.90)
338+
if server["clients"] > cap:
339+
points -= server["clients"] - cap
339340

340341
# 1 per month of age, limited to 8
341342
points += min(8, server["game_time"] / (60*60*24*30))
@@ -344,7 +345,7 @@ def server_points(server):
344345
points += min(4, server["pop_v"] / 2)
345346

346347
# -8 for unrealistic max_clients
347-
if server["clients_max"] >= 128:
348+
if server["clients_max"] > 200:
348349
points -= 8
349350

350351
# -8 per second of ping over 0.4s

0 commit comments

Comments
 (0)