add match

This commit is contained in:
aozhiwei 2021-09-26 05:08:03 +00:00
parent f57537da4d
commit b94a8ff9c2
7 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,8 @@
#include "precompile.h"
#include "match.h"
void Match::Init()
{
}

11
server/gameserver/match.h Normal file
View File

@ -0,0 +1,11 @@
#pragma once
class Room;
class Match
{
public:
Room* room = nullptr;
void Init();
};

View File

@ -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);

View File

@ -175,6 +175,7 @@ class MetaMgr : public a8::Singleton<MetaMgr>
int prebattle_combine_team = 1;
int async_send_mapblock = 1;
int show_team_ui = 1;
private:
MetaDataLoader* loader_ = nullptr;

View File

@ -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();

View File

@ -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;

View File

@ -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:
}
//