diff options
author | Patric Stout <truebrain@openttd.org> | 2021-01-31 10:36:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-31 10:36:07 +0100 |
commit | 7fbf705c41b2c902e5b2fa3f16cae421e42800b2 (patch) | |
tree | a3da521b06dee198a6cd1853569438d108c0b4a5 | |
parent | 1dda7d6486decf558d2ef848af3c22ee945801e6 (diff) | |
download | openttd-7fbf705c41b2c902e5b2fa3f16cae421e42800b2.tar.xz |
Fix 2db88953: default Network Server List sorter put compatible servers in wrong order (#8626)
If a server is compatible, it falls back to sorting by clients.
This used to be in reverse, so full servers are on top. With
the codechange commit, this was removed by accident, and as
such empty servers were on top. This is silly.
-rw-r--r-- | src/network/network_gui.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index a2c2cac19..42915c410 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -330,10 +330,9 @@ protected: if (r == 0) r = b->info.compatible - a->info.compatible; /* Passworded servers should be below unpassworded servers */ if (r == 0) r = a->info.use_password - b->info.use_password; - /* Finally sort on the number of clients of the server */ - if (r == 0) return NGameClientSorter(a, b); - return r < 0; + /* Finally sort on the number of clients of the server in reverse order. */ + return (r != 0) ? r < 0: !NGameClientSorter(a, b); } /** Sort the server list */ |