diff --git a/server/gameserver/match.cc b/server/gameserver/match.cc new file mode 100644 index 0000000..0f2e3f5 --- /dev/null +++ b/server/gameserver/match.cc @@ -0,0 +1,8 @@ +#include "precompile.h" + +#include "match.h" + +void Match::Init() +{ + +} diff --git a/server/gameserver/match.h b/server/gameserver/match.h new file mode 100644 index 0000000..22fc857 --- /dev/null +++ b/server/gameserver/match.h @@ -0,0 +1,11 @@ +#pragma once + +class Room; +class Match +{ + public: + Room* room = nullptr; + + void Init(); + +}; diff --git a/server/gameserver/metamgr.cc b/server/gameserver/metamgr.cc index 37cbdad..1f91bab 100644 --- a/server/gameserver/metamgr.cc +++ b/server/gameserver/metamgr.cc @@ -336,6 +336,10 @@ public: MetaMgr::Instance()->async_send_mapblock = MetaMgr::Instance()->GetSysParamAsInt("async_send_mapblock", 0); #ifdef DEBUG MetaMgr::Instance()->async_send_mapblock = 1; +#endif + MetaMgr::Instance()->show_team_ui = MetaMgr::Instance()->GetSysParamAsInt("show_team_ui", 0); +#ifdef DEBUG + MetaMgr::Instance()->show_team_ui = 1; #endif { METAMGR_READ(prebattle_box_id_chiji, 0); diff --git a/server/gameserver/metamgr.h b/server/gameserver/metamgr.h index afa68e8..9486c22 100644 --- a/server/gameserver/metamgr.h +++ b/server/gameserver/metamgr.h @@ -175,6 +175,7 @@ class MetaMgr : public a8::Singleton int prebattle_combine_team = 1; int async_send_mapblock = 1; + int show_team_ui = 1; private: MetaDataLoader* loader_ = nullptr; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index aea9878..ad413ff 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -33,6 +33,7 @@ #include "mapmgr.h" #include "incubator.h" #include "team.h" +#include "match.h" const int SHUA_RANGE = 580; @@ -90,6 +91,9 @@ void Room::Init() incubator_ = new Incubator(); incubator_->room = this; incubator_->Init(); + match_ = new Match(); + match_->room = this; + match_->Init(); if (room_type_ == RT_NewBrid && creator_game_times_ <= 0) { CreateLevel0RoomSpecThings(); } @@ -105,6 +109,7 @@ void Room::UnInit() UnInitDebugInfo(); #endif incubator_->UnInit(); + A8_SAFE_DELETE(match_); A8_SAFE_DELETE(incubator_); timer_attacher.ClearTimerList(); xtimer_attacher_.ClearTimerList(); diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 90c31af..819e859 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -40,6 +40,7 @@ class Car; class Hero; class Incubator; class Team; +class Match; class MapInstance; struct RoomInitInfo; struct ObstacleData @@ -377,6 +378,7 @@ private: xtimer_list* auto_jump_timer_ = nullptr; Incubator* incubator_ = nullptr; + Match* match_ = nullptr; bool infinite_bullet_mode_ = false; diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 6f682d9..23af7d4 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -1091,6 +1091,8 @@ message SMJoinedNotify optional int32 room_mode = 8; //0:吃鸡模式 1:僵尸模式 optional string server_info = 9; //服务器信息(重连时使用) + + optional int32 show_team_ui = 10; //是否显示队伍界面 1:显示队伍界面 0:直接进游戏 } //地图信息