1
This commit is contained in:
parent
12c82c3b25
commit
d044953e9c
@ -45,6 +45,7 @@ namespace mt
|
||||
s_.match_lock_time++;
|
||||
#endif
|
||||
s_.pre_client_shot = GetIntParam("pre_client_shot", 0);
|
||||
s_.match_mode_wait_time = GetIntParam("match_mode_wait_time", 10);
|
||||
#if 1
|
||||
{
|
||||
std::string point = GetStringParam("newbie_room_born_point", "3471.3662:6.8399:5268.6240");
|
||||
|
@ -114,6 +114,8 @@ namespace mt
|
||||
|
||||
int newbie_room_battle_times = 0;
|
||||
int mid_room_max_rank = 0;
|
||||
|
||||
int match_mode_wait_time = 0;
|
||||
};
|
||||
static void StaticPostInit();
|
||||
static const S& s() { return s_; };
|
||||
|
@ -1008,6 +1008,9 @@ bool Room::CanJoin(const std::string& accountid,
|
||||
const cs::CMJoin& msg)
|
||||
{
|
||||
if (lock_room_) {
|
||||
if (IsPvpRankModeRoom()) {
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (IsNewBieRoom()) {
|
||||
@ -1075,9 +1078,6 @@ bool Room::CanJoin(const std::string& accountid,
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (IsPvpRankModeRoom()) {
|
||||
|
||||
}
|
||||
return GetPlayerNum() < (int)GetRoomMaxPlayerNum();
|
||||
}
|
||||
@ -1325,7 +1325,10 @@ void Room::UpdateGasInactivePvp()
|
||||
bool over = GetFrameNo() - gas_data_.gas_start_frameno >=
|
||||
GetGasInactiveTime() * SERVER_FRAME_RATE;
|
||||
if (IsPvpRankModeRoom()) {
|
||||
|
||||
if (lock_room_) {
|
||||
over = GetFrameNo() - lock_room_frameno_ >=
|
||||
mt::Param::s().match_mode_wait_time * SERVER_FRAME_RATE;
|
||||
}
|
||||
}
|
||||
if (over) {
|
||||
long long begin_tick = a8::XGetTickCount();
|
||||
@ -3455,3 +3458,9 @@ void Room::GMFastForward()
|
||||
},
|
||||
&xtimer_attacher_);
|
||||
}
|
||||
|
||||
void Room::LockRoom()
|
||||
{
|
||||
lock_room_ = true;
|
||||
lock_room_frameno_ = GetFrameNo();
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ public:
|
||||
bool SupportSandTable();
|
||||
std::shared_ptr<SandTable> GetSandTable() { return sand_table_; }
|
||||
bool IsSandTableRoom();
|
||||
void LockRoom() { lock_room_ = true; }
|
||||
void LockRoom();
|
||||
void CombineTeam();
|
||||
void FillTeam();
|
||||
bool HasRoomSwitch(int tag);
|
||||
@ -405,6 +405,7 @@ private:
|
||||
Team* victory_team_ = nullptr;
|
||||
bool force_over_ = false;
|
||||
bool lock_room_ = false;
|
||||
long long lock_room_frameno_ = 0;
|
||||
|
||||
long long room_switch_ = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user