1
This commit is contained in:
parent
b28668f568
commit
a676e22867
@ -353,12 +353,7 @@ void Room::ShuaAndroid()
|
|||||||
int refresh_time = a8::RandEx(map_meta_->refresh_robot_min_time,
|
int refresh_time = a8::RandEx(map_meta_->refresh_robot_min_time,
|
||||||
map_meta_->refresh_robot_max_time);
|
map_meta_->refresh_robot_max_time);
|
||||||
if (robot_num > 0 && refresh_time > 0) {
|
if (robot_num > 0 && refresh_time > 0) {
|
||||||
if (IsPvpRankModeRoom()) {
|
CreateAndroid(robot_num);
|
||||||
refresh_time = a8::RandEx(10, 20);
|
|
||||||
CreateAndroid(robot_num);
|
|
||||||
} else {
|
|
||||||
CreateAndroid(robot_num);
|
|
||||||
}
|
|
||||||
xtimer.SetTimeoutEx
|
xtimer.SetTimeoutEx
|
||||||
(SERVER_FRAME_RATE * refresh_time,
|
(SERVER_FRAME_RATE * refresh_time,
|
||||||
[this] (int event, const a8::Args* args)
|
[this] (int event, const a8::Args* args)
|
||||||
@ -1022,20 +1017,7 @@ bool Room::CanJoin(const std::string& accountid,
|
|||||||
const cs::CMJoin& msg)
|
const cs::CMJoin& msg)
|
||||||
{
|
{
|
||||||
if (lock_room_) {
|
if (lock_room_) {
|
||||||
if (IsPvpRankModeRoom()) {
|
return false;
|
||||||
if (!HaveMyTeam(msg.team_uuid())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (IsPvpRankModeRoom()) {
|
|
||||||
if (GetGasInactiveReaminTime() < 60) {
|
|
||||||
if (!HaveMyTeam(msg.team_uuid())) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (IsNewBieRoom()) {
|
if (IsNewBieRoom()) {
|
||||||
return false;
|
return false;
|
||||||
@ -1103,21 +1085,6 @@ bool Room::CanJoin(const std::string& accountid,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (IsPvpRankModeRoom() && GetOnlinePlayerNum() >= mt::Param::s().rank_mode_min_player) {
|
|
||||||
if (lock_room_timer_.expired()) {
|
|
||||||
lock_room_timer_ = xtimer.SetTimeoutWpEx
|
|
||||||
(SERVER_FRAME_RATE * 10,
|
|
||||||
[this] (int event, const a8::Args* args)
|
|
||||||
{
|
|
||||||
if (a8::TIMER_EXEC_EVENT == event) {
|
|
||||||
if (!lock_room_) {
|
|
||||||
LockRoom();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
&xtimer_attacher_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return GetPlayerNum() < (int)GetRoomMaxPlayerNum();
|
return GetPlayerNum() < (int)GetRoomMaxPlayerNum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1363,12 +1330,6 @@ void Room::UpdateGasInactivePvp()
|
|||||||
{
|
{
|
||||||
bool over = GetFrameNo() - gas_data_.gas_start_frameno >=
|
bool over = GetFrameNo() - gas_data_.gas_start_frameno >=
|
||||||
GetGasInactiveTime() * SERVER_FRAME_RATE;
|
GetGasInactiveTime() * SERVER_FRAME_RATE;
|
||||||
if (IsPvpRankModeRoom()) {
|
|
||||||
if (lock_room_) {
|
|
||||||
over = GetFrameNo() - lock_room_frameno_ >=
|
|
||||||
mt::Param::s().rank_mode_wait_time * SERVER_FRAME_RATE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (over) {
|
if (over) {
|
||||||
long long begin_tick = a8::XGetTickCount();
|
long long begin_tick = a8::XGetTickCount();
|
||||||
gas_data_.SetGasMode(GasJump);
|
gas_data_.SetGasMode(GasJump);
|
||||||
@ -2310,9 +2271,6 @@ void Room::NotifyGameStart()
|
|||||||
|
|
||||||
long long Room::GetGasInactiveTime()
|
long long Room::GetGasInactiveTime()
|
||||||
{
|
{
|
||||||
if (IsPvpRankModeRoom()) {
|
|
||||||
return 60 * 60;
|
|
||||||
}
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (!f8::IsTestEnv()) {
|
if (!f8::IsTestEnv()) {
|
||||||
return 12;
|
return 12;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user