From e6ab525906b913a9eef6a6cb5956a600d45664a7 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 13 Aug 2019 15:39:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8A=82=E7=82=B9=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/masterserver/gsmgr.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/server/masterserver/gsmgr.cc b/server/masterserver/gsmgr.cc index 2df110d..8cd2272 100644 --- a/server/masterserver/gsmgr.cc +++ b/server/masterserver/gsmgr.cc @@ -167,10 +167,19 @@ void GSMgr::RearrangeNode() [] (const GSNode* a, const GSNode* b) { if (a->servicing && b->servicing) { - return - a->online_num < b->online_num || - a->room_num < b->room_num || - a->node_idx > b->node_idx; + if (a->room_num < b->room_num) { + return true; + } + if (a->room_num > b->room_num) { + return false; + } + if (a->online_num < b->online_num) { + return true; + } + if (a->online_num > b->online_num) { + return false; + } + return a->node_idx > b->node_idx; } if (a->servicing) { return true;