This commit is contained in:
aozhiwei 2019-04-16 10:13:47 +08:00
parent e92c446de8
commit 06a6dd0806
4 changed files with 16 additions and 3 deletions

View File

@ -443,7 +443,7 @@ void App::UnInitLog()
bool App::ParseOpt() bool App::ParseOpt()
{ {
int ch = 0; int ch = 0;
while ((ch = getopt(argc, argv, "i:t:r:")) != -1) { while ((ch = getopt(argc, argv, "i:t:r:f:")) != -1) {
switch (ch) { switch (ch) {
case 'i': case 'i':
{ {
@ -455,6 +455,16 @@ bool App::ParseOpt()
is_test_mode = true; is_test_mode = true;
test_param = a8::XValue(optarg); test_param = a8::XValue(optarg);
} }
break;
case 'f':
{
std::vector<std::string> strings;
a8::Split(optarg, strings, ',');
for (auto& str : strings) {
flags.insert(a8::XValue(str).GetInt());
}
}
break;
} }
} }
return instance_id > 0; return instance_id > 0;

View File

@ -60,6 +60,7 @@ public:
int instance_id = 0; int instance_id = 0;
bool is_test_mode = false; bool is_test_mode = false;
int test_param = 0; int test_param = 0;
std::set<int> flags;
private: private:
long long last_run_tick_ = 0; long long last_run_tick_ = 0;

View File

@ -73,6 +73,8 @@ class Human : public Entity
int pain_killer_frameno = 0; int pain_killer_frameno = 0;
xtimer_list* pain_killer_timer = nullptr; xtimer_list* pain_killer_timer = nullptr;
std::set<Human*> friends;
Human(); Human();
virtual ~Human() override; virtual ~Human() override;
virtual void Initialize() override; virtual void Initialize() override;

View File

@ -614,8 +614,8 @@ message SMUpdate
optional int32 gas_progress = 16; //,(gas_data.mode == moving时才会发进度) optional int32 gas_progress = 16; //,(gas_data.mode == moving时才会发进度)
optional MFVector2D gas_pos_old = 30; // optional MFVector2D gas_pos_old = 30; //
optional MFGasData gas_data = 17; // optional MFGasData gas_data = 17; //
repeated MFTeamData team_data = 18; repeated MFTeamData team_data = 18; //
repeated MFTeammateInfo teams = 19; // repeated MFTeammateInfo teammate_data = 19; //()
repeated MFBullet bullets = 20; // repeated MFBullet bullets = 20; //
repeated MFShot shots = 21; // repeated MFShot shots = 21; //
repeated MFExplosion explosions = 22; // repeated MFExplosion explosions = 22; //