add match
This commit is contained in:
parent
f57537da4d
commit
b94a8ff9c2
8
server/gameserver/match.cc
Normal file
8
server/gameserver/match.cc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include "precompile.h"
|
||||||
|
|
||||||
|
#include "match.h"
|
||||||
|
|
||||||
|
void Match::Init()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
11
server/gameserver/match.h
Normal file
11
server/gameserver/match.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class Room;
|
||||||
|
class Match
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Room* room = nullptr;
|
||||||
|
|
||||||
|
void Init();
|
||||||
|
|
||||||
|
};
|
@ -336,6 +336,10 @@ public:
|
|||||||
MetaMgr::Instance()->async_send_mapblock = MetaMgr::Instance()->GetSysParamAsInt("async_send_mapblock", 0);
|
MetaMgr::Instance()->async_send_mapblock = MetaMgr::Instance()->GetSysParamAsInt("async_send_mapblock", 0);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
MetaMgr::Instance()->async_send_mapblock = 1;
|
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
|
#endif
|
||||||
{
|
{
|
||||||
METAMGR_READ(prebattle_box_id_chiji, 0);
|
METAMGR_READ(prebattle_box_id_chiji, 0);
|
||||||
|
@ -175,6 +175,7 @@ class MetaMgr : public a8::Singleton<MetaMgr>
|
|||||||
int prebattle_combine_team = 1;
|
int prebattle_combine_team = 1;
|
||||||
|
|
||||||
int async_send_mapblock = 1;
|
int async_send_mapblock = 1;
|
||||||
|
int show_team_ui = 1;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MetaDataLoader* loader_ = nullptr;
|
MetaDataLoader* loader_ = nullptr;
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "mapmgr.h"
|
#include "mapmgr.h"
|
||||||
#include "incubator.h"
|
#include "incubator.h"
|
||||||
#include "team.h"
|
#include "team.h"
|
||||||
|
#include "match.h"
|
||||||
|
|
||||||
const int SHUA_RANGE = 580;
|
const int SHUA_RANGE = 580;
|
||||||
|
|
||||||
@ -90,6 +91,9 @@ void Room::Init()
|
|||||||
incubator_ = new Incubator();
|
incubator_ = new Incubator();
|
||||||
incubator_->room = this;
|
incubator_->room = this;
|
||||||
incubator_->Init();
|
incubator_->Init();
|
||||||
|
match_ = new Match();
|
||||||
|
match_->room = this;
|
||||||
|
match_->Init();
|
||||||
if (room_type_ == RT_NewBrid && creator_game_times_ <= 0) {
|
if (room_type_ == RT_NewBrid && creator_game_times_ <= 0) {
|
||||||
CreateLevel0RoomSpecThings();
|
CreateLevel0RoomSpecThings();
|
||||||
}
|
}
|
||||||
@ -105,6 +109,7 @@ void Room::UnInit()
|
|||||||
UnInitDebugInfo();
|
UnInitDebugInfo();
|
||||||
#endif
|
#endif
|
||||||
incubator_->UnInit();
|
incubator_->UnInit();
|
||||||
|
A8_SAFE_DELETE(match_);
|
||||||
A8_SAFE_DELETE(incubator_);
|
A8_SAFE_DELETE(incubator_);
|
||||||
timer_attacher.ClearTimerList();
|
timer_attacher.ClearTimerList();
|
||||||
xtimer_attacher_.ClearTimerList();
|
xtimer_attacher_.ClearTimerList();
|
||||||
|
@ -40,6 +40,7 @@ class Car;
|
|||||||
class Hero;
|
class Hero;
|
||||||
class Incubator;
|
class Incubator;
|
||||||
class Team;
|
class Team;
|
||||||
|
class Match;
|
||||||
class MapInstance;
|
class MapInstance;
|
||||||
struct RoomInitInfo;
|
struct RoomInitInfo;
|
||||||
struct ObstacleData
|
struct ObstacleData
|
||||||
@ -377,6 +378,7 @@ private:
|
|||||||
xtimer_list* auto_jump_timer_ = nullptr;
|
xtimer_list* auto_jump_timer_ = nullptr;
|
||||||
|
|
||||||
Incubator* incubator_ = nullptr;
|
Incubator* incubator_ = nullptr;
|
||||||
|
Match* match_ = nullptr;
|
||||||
|
|
||||||
bool infinite_bullet_mode_ = false;
|
bool infinite_bullet_mode_ = false;
|
||||||
|
|
||||||
|
@ -1091,6 +1091,8 @@ message SMJoinedNotify
|
|||||||
optional int32 room_mode = 8; //0:吃鸡模式 1:僵尸模式
|
optional int32 room_mode = 8; //0:吃鸡模式 1:僵尸模式
|
||||||
|
|
||||||
optional string server_info = 9; //服务器信息(重连时使用)
|
optional string server_info = 9; //服务器信息(重连时使用)
|
||||||
|
|
||||||
|
optional int32 show_team_ui = 10; //是否显示队伍界面 1:显示队伍界面 0:直接进游戏
|
||||||
}
|
}
|
||||||
|
|
||||||
//地图信息
|
//地图信息
|
||||||
|
Loading…
x
Reference in New Issue
Block a user