diff --git a/server/gameserver/mt/Param.cc b/server/gameserver/mt/Param.cc index 691d60a7..327a4707 100644 --- a/server/gameserver/mt/Param.cc +++ b/server/gameserver/mt/Param.cc @@ -19,6 +19,8 @@ namespace mt { { s_.gas_inactive_time = GetIntParam("gas_inactive_time"); + s_.rank_gas_inactive_time = GetIntParam("rank_gas_inactive_time", 40); + s_.master_rank_gas_inactive_time = GetIntParam("rank_gas_inactive_time", 60); s_.downed_relive_recover_hp = GetIntParam("downed_relive_recover_hp"); diff --git a/server/gameserver/mt/Param.h b/server/gameserver/mt/Param.h index c30d5572..7acf2282 100644 --- a/server/gameserver/mt/Param.h +++ b/server/gameserver/mt/Param.h @@ -13,6 +13,8 @@ namespace mt struct S { int android_auto_combine_team = 1; int gas_inactive_time = 10; + int rank_gas_inactive_time = 40; + int master_rank_gas_inactive_time = 60; float kill_param = 0.0f; float rank_param = 0.0f; int fighting_mode = 0; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 5782febe..d2001cd5 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -2279,7 +2279,15 @@ long long Room::GetGasInactiveTime() if (IsPveRoom()) { return 10; } else { - return mt::Param::s().gas_inactive_time; + if (IsPvpRankModeRoom()) { + if (IsPvpMasterRankModeRoom()) { + return mt::Param::s().master_rank_gas_inactive_time; + } else { + return mt::Param::s().rank_gas_inactive_time; + } + } else { + return mt::Param::s().gas_inactive_time; + } } } @@ -3498,3 +3506,8 @@ bool Room::MoveCanReach(const glm::vec3& start, const glm::vec3& end) { return BulletCanReach(start, end); } + +bool Room::IsPvpMasterRankModeRoom() +{ + return false; +} diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 2461ae62..e7da6108 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -116,6 +116,7 @@ public: bool IsSurvivalRoom(); bool IsNewBieRoom(); bool IsPvpRankModeRoom() { return GetRoomMode() == kPvpRankMode; } + bool IsPvpMasterRankModeRoom(); int GetPlayerNum(); int GetHumanNum();