From b3b3e2f6ea79cace97df0ff8d697fc4a6752b2ba Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 21 Apr 2020 09:56:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BA=8E5=E4=B8=AA=E4=BA=BA=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E4=B8=8D=E5=A4=8D=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/human.cc | 3 ++- server/gameserver/roommgr.cc | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 3039a6f..b8759e6 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -858,7 +858,8 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id) dead_frameno = room->frame_no; ++dead_times; int max_revive_times = MetaMgr::Instance()->GetSysParamAsInt("max_revive_times", 1); - if (weapon_id != VW_Spectate && + if (AliveCount() >= 5 && + weapon_id != VW_Spectate && dead_times <= max_revive_times && room->AliveCount() > 2 && entity_subtype == EST_Player) { diff --git a/server/gameserver/roommgr.cc b/server/gameserver/roommgr.cc index 0827f9d..fde611d 100644 --- a/server/gameserver/roommgr.cc +++ b/server/gameserver/roommgr.cc @@ -322,5 +322,8 @@ void RoomMgr::InstallReportStateTimer() bool RoomMgr::IsLimitJoin() { return RoomNum() >= ROOM_NUM_UP_LIMIT || - (RoomNum() >= ROOM_NUM_DOWN_LIMIT && App::Instance()->perf.alive_count >= HUM_NUM_DOWN_LIMIT); + ( + RoomNum() >= ROOM_NUM_DOWN_LIMIT && + App::Instance()->perf.alive_count >= HUM_NUM_DOWN_LIMIT + ); }