diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index b86f0dce..beb05397 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -62,6 +62,13 @@ #include "mt/Robot.h" #include "mt/SafeAreaPos.h" +struct FrameCallNode +{ + FrameCallCb cb = nullptr; + void* context = nullptr; + FrameCallNode* next = nullptr; +}; + const int SHUA_RANGE = 580; static long long RoomXGetTickCount(void* context) @@ -3617,3 +3624,13 @@ void Room::AddReportBullet(int bullet_uniid) }, &xtimer_attacher_); } + +void Room::AddFrameCall(FrameCallCb cb, void* context) +{ + +} + +void Room::UpdateFrameCall() +{ + +} diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 94eac534..4012f1bb 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -50,6 +50,8 @@ struct CarObject bool taken = false; }; +typedef void (*FrameCallCb)(void*); +struct FrameCallNode; class MatchTeam; class Room { @@ -224,6 +226,7 @@ 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); private: void ShuaAndroid(); @@ -307,6 +310,7 @@ private: bool IsAllRealDead(); void AutoJump(); + void UpdateFrameCall(); private: bool destorying_ = false; @@ -373,6 +377,10 @@ private: std::shared_ptr air_drop_; std::shared_ptr air_raid_; + FrameCallNode* top_node_ = nullptr; + FrameCallNode* bot_node_ = nullptr; + FrameCallNode* work_node_ = nullptr; + friend class Incubator; friend class Team; };