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 + ); }