diff --git a/server/gameserver/app.cc b/server/gameserver/app.cc index 33567f7..af250ee 100755 --- a/server/gameserver/app.cc +++ b/server/gameserver/app.cc @@ -443,7 +443,7 @@ void App::UnInitLog() bool App::ParseOpt() { int ch = 0; - while ((ch = getopt(argc, argv, "i:t:r:")) != -1) { + while ((ch = getopt(argc, argv, "i:t:r:f:")) != -1) { switch (ch) { case 'i': { @@ -455,6 +455,16 @@ bool App::ParseOpt() is_test_mode = true; test_param = a8::XValue(optarg); } + break; + case 'f': + { + std::vector strings; + a8::Split(optarg, strings, ','); + for (auto& str : strings) { + flags.insert(a8::XValue(str).GetInt()); + } + } + break; } } return instance_id > 0; diff --git a/server/gameserver/app.h b/server/gameserver/app.h index 2039e4b..815c1d3 100644 --- a/server/gameserver/app.h +++ b/server/gameserver/app.h @@ -60,6 +60,7 @@ public: int instance_id = 0; bool is_test_mode = false; int test_param = 0; + std::set flags; private: long long last_run_tick_ = 0; diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 22f2d48..dce735f 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -73,6 +73,8 @@ class Human : public Entity int pain_killer_frameno = 0; xtimer_list* pain_killer_timer = nullptr; + std::set friends; + Human(); virtual ~Human() override; virtual void Initialize() override; diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 80bd12f..e2a75ef 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -614,8 +614,8 @@ message SMUpdate optional int32 gas_progress = 16; //毒圈进度,表示缩进的像素数(只有当gas_data.mode == moving时才会发进度) optional MFVector2D gas_pos_old = 30; //毒圈当前圆心坐标 optional MFGasData gas_data = 17; //毒圈数据 - repeated MFTeamData team_data = 18; - repeated MFTeammateInfo teams = 19; //同队队友数据 + repeated MFTeamData team_data = 18; //活跃玩家队伍数据 + repeated MFTeammateInfo teammate_data = 19; //同队队友数据(自己的队友数据) repeated MFBullet bullets = 20; //子弹 repeated MFShot shots = 21; //射击 repeated MFExplosion explosions = 22; //爆炸