From b79c4c972a28754acbc1d90d43c2b62d39471348 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 19 May 2023 13:06:30 +0800 Subject: [PATCH] 1 --- server/gameserver/room.cc | 6 ++++++ server/gameserver/room.h | 1 + 2 files changed, 7 insertions(+) diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index c2ebd0bd..6f792f07 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -947,6 +947,9 @@ bool Room::CanJoin(const std::string& accountid, int init_map_id, const cs::CMJoin& msg) { + if (lock_room_) { + return false; + } if (IsNewBieRoom()) { return false; } @@ -1008,6 +1011,9 @@ bool Room::CanJoin(const std::string& accountid, bool Room::CanJoin(class MatchTeam* team) { + if (lock_room_) { + return false; + } if (GetGasData().GetGasMode() != GasInactive) { return false; } diff --git a/server/gameserver/room.h b/server/gameserver/room.h index f5283d91..acebcabb 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -402,6 +402,7 @@ private: Team* victory_team_ = nullptr; bool force_over_ = false; + bool lock_room_ = false; friend class Incubator; friend class Team;