1
This commit is contained in:
parent
3cb4c5160d
commit
b9a99c15ba
@ -71,13 +71,6 @@
|
||||
#include "mt/SafeAreaPos.h"
|
||||
#include "mt/MapThingGroup.h"
|
||||
|
||||
struct FrameCallNode
|
||||
{
|
||||
FrameCallCb cb = nullptr;
|
||||
void* context = nullptr;
|
||||
FrameCallNode* next = nullptr;
|
||||
};
|
||||
|
||||
const int SHUA_RANGE = 580;
|
||||
|
||||
static long long RoomXGetTickCount(void* context)
|
||||
@ -161,7 +154,6 @@ void Room::Init()
|
||||
void Room::UnInit()
|
||||
{
|
||||
destorying_ = true;
|
||||
UpdateFrameCall();
|
||||
incubator_->UnInit();
|
||||
#ifdef DEBUG
|
||||
UnInitDebugInfo();
|
||||
@ -214,7 +206,6 @@ void Room::Update(int delta_time)
|
||||
long long end_tick = a8::XGetTickCount();
|
||||
#endif
|
||||
room_agent_->Exec();
|
||||
UpdateFrameCall();
|
||||
if (GetFrameNo() % 2 == 0) {
|
||||
UpdateGas();
|
||||
}
|
||||
@ -3473,37 +3464,6 @@ void Room::AddReportBullet(int bullet_uniid)
|
||||
&xtimer_attacher_);
|
||||
}
|
||||
|
||||
void Room::AddFrameCall(FrameCallCb cb, void* context)
|
||||
{
|
||||
FrameCallNode *p = new FrameCallNode;
|
||||
p->cb = cb;
|
||||
p->context = context;
|
||||
if (bot_node_) {
|
||||
bot_node_->next = p;
|
||||
bot_node_ = p;
|
||||
} else {
|
||||
top_node_ = p;
|
||||
bot_node_ = p;
|
||||
}
|
||||
}
|
||||
|
||||
void Room::UpdateFrameCall()
|
||||
{
|
||||
if (!work_node_ && top_node_) {
|
||||
work_node_ = top_node_;
|
||||
top_node_ = nullptr;
|
||||
bot_node_ = nullptr;
|
||||
}
|
||||
while (work_node_) {
|
||||
FrameCallNode *pdelnode = work_node_;
|
||||
work_node_ = pdelnode->next;
|
||||
if (pdelnode->cb) {
|
||||
pdelnode->cb(pdelnode->context);
|
||||
}
|
||||
delete pdelnode;
|
||||
}//end while
|
||||
}
|
||||
|
||||
int Room::GetReportRoomMode()
|
||||
{
|
||||
return IsPveRoom() ? 1 : 0;
|
||||
|
@ -67,8 +67,6 @@ enum RoomSwitch_e
|
||||
kRoomSwitchDisableShot,
|
||||
};
|
||||
|
||||
typedef void (*FrameCallCb)(void*);
|
||||
struct FrameCallNode;
|
||||
class MatchTeam;
|
||||
class Room
|
||||
{
|
||||
@ -250,7 +248,6 @@ public:
|
||||
bool FindWalkablePointWithOutHouse(const glm::vec3& center, int try_count, int step, glm::vec3& out_point);
|
||||
void AddReportBullet(int bullet_uniid);
|
||||
bool IsDestorying() { return destorying_; }
|
||||
void AddFrameCall(FrameCallCb cb, void* context);
|
||||
void SetVictoryTeam(Team* team) { victory_team_ = team;};
|
||||
Team* GetVictoryTeam() { return victory_team_;};
|
||||
int GetReportRoomMode();
|
||||
@ -351,7 +348,6 @@ private:
|
||||
|
||||
bool IsAllRealDead();
|
||||
void AutoJump();
|
||||
void UpdateFrameCall();
|
||||
void FillCustomBattleHuman();
|
||||
|
||||
private:
|
||||
@ -422,10 +418,6 @@ private:
|
||||
std::shared_ptr<AirRaid> air_raid_;
|
||||
std::shared_ptr<BatchSync> batch_sync_;
|
||||
|
||||
FrameCallNode* top_node_ = nullptr;
|
||||
FrameCallNode* bot_node_ = nullptr;
|
||||
FrameCallNode* work_node_ = nullptr;
|
||||
|
||||
Team* victory_team_ = nullptr;
|
||||
bool force_over_ = false;
|
||||
bool lock_room_ = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user