1
This commit is contained in:
parent
53a68849a0
commit
0c6b8a22ee
@ -38,6 +38,7 @@ namespace mt
|
|||||||
s_.match_lock_time = GetIntParam("match_lock_time", 0);
|
s_.match_lock_time = GetIntParam("match_lock_time", 0);
|
||||||
s_.pickup_weapon_replace_type = GetIntParam("pickup_weapon_replace_type", 0);
|
s_.pickup_weapon_replace_type = GetIntParam("pickup_weapon_replace_type", 0);
|
||||||
s_.sand_table_move_speed = GetIntParam("sand_table_move_speed", 500);
|
s_.sand_table_move_speed = GetIntParam("sand_table_move_speed", 500);
|
||||||
|
s_.wait_cloud_time = GetIntParam("wait_cloud_time", 10);
|
||||||
#if 1
|
#if 1
|
||||||
s_.match_lock_time++;
|
s_.match_lock_time++;
|
||||||
#endif
|
#endif
|
||||||
|
@ -100,6 +100,7 @@ namespace mt
|
|||||||
|
|
||||||
int compose_mode = 1;
|
int compose_mode = 1;
|
||||||
float sand_table_move_speed = 500;
|
float sand_table_move_speed = 500;
|
||||||
|
float wait_cloud_time = 3;
|
||||||
|
|
||||||
};
|
};
|
||||||
static void StaticPostInit();
|
static void StaticPostInit();
|
||||||
|
@ -1313,6 +1313,7 @@ void Room::UpdateGasInactivePvp()
|
|||||||
});
|
});
|
||||||
NotifyUiUpdate();
|
NotifyUiUpdate();
|
||||||
NotifyGameStart();
|
NotifyGameStart();
|
||||||
|
sand_table_->OnGameStart();
|
||||||
} else {
|
} else {
|
||||||
ShuaPlane();
|
ShuaPlane();
|
||||||
RoomMgr::Instance()->ActiveRoom(GetRoomUuid());
|
RoomMgr::Instance()->ActiveRoom(GetRoomUuid());
|
||||||
@ -3856,3 +3857,13 @@ bool Room::HasRoomSwitch(int tag)
|
|||||||
{
|
{
|
||||||
return a8::HasBitFlag(room_switch_, tag);
|
return a8::HasBitFlag(room_switch_, tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Room::OpenRoomSwitch(int tag)
|
||||||
|
{
|
||||||
|
a8::SetBitFlag(room_switch_, tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Room::CloseRoomSwitch(int tag)
|
||||||
|
{
|
||||||
|
a8::UnSetBitFlag(room_switch_, tag);
|
||||||
|
}
|
||||||
|
@ -248,6 +248,8 @@ public:
|
|||||||
void CombineTeam();
|
void CombineTeam();
|
||||||
void FillTeam();
|
void FillTeam();
|
||||||
bool HasRoomSwitch(int tag);
|
bool HasRoomSwitch(int tag);
|
||||||
|
void OpenRoomSwitch(int tag);
|
||||||
|
void CloseRoomSwitch(int tag);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ShuaAndroid();
|
void ShuaAndroid();
|
||||||
|
@ -3,8 +3,12 @@
|
|||||||
#include "sandtable.h"
|
#include "sandtable.h"
|
||||||
#include "room.h"
|
#include "room.h"
|
||||||
|
|
||||||
|
#include "mt/Param.h"
|
||||||
|
|
||||||
SandTable::SandTable(Room* room): room_(room)
|
SandTable::SandTable(Room* room): room_(room)
|
||||||
{
|
{
|
||||||
|
room->OpenRoomSwitch(kRoomSwitchDisableUseSkill);
|
||||||
|
room->OpenRoomSwitch(kRoomSwitchDisableUseItem);
|
||||||
int lock_time = std::max(0, (int)room->GetGasInactiveTime() - 10);
|
int lock_time = std::max(0, (int)room->GetGasInactiveTime() - 10);
|
||||||
room->xtimer.SetTimeoutEx
|
room->xtimer.SetTimeoutEx
|
||||||
(SERVER_FRAME_RATE * lock_time,
|
(SERVER_FRAME_RATE * lock_time,
|
||||||
@ -18,3 +22,16 @@ SandTable::SandTable(Room* room): room_(room)
|
|||||||
},
|
},
|
||||||
&room->xtimer_attacher_);
|
&room->xtimer_attacher_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SandTable::OnGameStart()
|
||||||
|
{
|
||||||
|
room_->xtimer.SetTimeoutEx
|
||||||
|
(SERVER_FRAME_RATE * mt::Param::s().wait_cloud_time,
|
||||||
|
[room = room_] (int event, const a8::Args* args)
|
||||||
|
{
|
||||||
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
&room_->xtimer_attacher_);
|
||||||
|
}
|
||||||
|
@ -14,6 +14,7 @@ class SandTable
|
|||||||
SandTable(Room* room);
|
SandTable(Room* room);
|
||||||
|
|
||||||
void FillMFSandTable(cs::SMUpdate* msg, Human* hum, FrameData* framedata);
|
void FillMFSandTable(cs::SMUpdate* msg, Human* hum, FrameData* framedata);
|
||||||
|
void OnGameStart();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Room* room_ = nullptr;
|
Room* room_ = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user