From bea8882743acfdf057de15a7c3d3517811e8e0e6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 3 Jun 2019 10:33:53 +0800 Subject: [PATCH 1/3] 1 --- server/masterserver/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/masterserver/CMakeLists.txt b/server/masterserver/CMakeLists.txt index 8c97cfe..e27615a 100644 --- a/server/masterserver/CMakeLists.txt +++ b/server/masterserver/CMakeLists.txt @@ -37,6 +37,12 @@ aux_source_directory(../../third_party/framework/cpp SRC_LIST ) +execute_process( + COMMAND touch -a ss_proto.pb.h + COMMAND touch -a ss_proto.pb.cc + COMMAND touch -a ss_msgid.pb.h + COMMAND touch -a ss_msgid.pb.cc + ) aux_source_directory(. SRC_LIST ) From 131eff7f83220acfdcef1e9f857319eeb7d9359f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 3 Jun 2019 14:13:04 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B0=84=E5=87=BB?= =?UTF-8?q?=E6=97=B6=E9=80=9F=E5=BA=A6=E5=87=8F=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/human.cc | 8 ++++++++ server/gameserver/human.h | 5 +++++ server/gameserver/player.h | 5 ----- server/tools/protobuild/metatable.proto | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 03c200a..32af722 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -66,6 +66,14 @@ float Human::GetSpeed() } if (downed) { return meta->i->move_speed3() + buff.speed; } else { + if (shot_hold) { + if (curr_weapon->weapon_idx == GUN_SLOT1 || + curr_weapon->weapon_idx == GUN_SLOT2) { + if (action_type != AT_Reload) { + return meta->i->shot_speed(); + } + } + } return meta->i->move_speed() + buff.speed; } } diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 8508bc2..dc55c47 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -96,6 +96,11 @@ class Human : public Entity std::set* team_members = nullptr; std::set kill_humans; + bool shot_start = false; + bool shot_hold = false; + int series_shot_frames = 0; + float fly_distance = 0.0f; + long long jump_frameno = 0; long long send_msg_times = 0; diff --git a/server/gameserver/player.h b/server/gameserver/player.h index 6b82065..cfdbd22 100644 --- a/server/gameserver/player.h +++ b/server/gameserver/player.h @@ -30,11 +30,6 @@ class Player : public Human bool moving = false; int moved_frames = 0; - bool shot_start = false; - bool shot_hold = false; - int series_shot_frames = 0; - float fly_distance = 0.0f; - bool select_weapon = false; int selected_weapon_idx = 0; diff --git a/server/tools/protobuild/metatable.proto b/server/tools/protobuild/metatable.proto index 106612f..4498fd7 100755 --- a/server/tools/protobuild/metatable.proto +++ b/server/tools/protobuild/metatable.proto @@ -98,6 +98,7 @@ message Player optional int32 move_speed = 4; //移动速度 optional int32 jump_speed = 5; //跳伞速度 optional int32 move_speed3 = 6; + optional int32 shot_speed = 7; optional int32 move_speed4 = 10; //移动速度4 optional float def = 11; //防御 optional string volume = 12; //初始库存 From 14f81a4ddfc7f1ed45d17d16ec14a476e6f95464 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 3 Jun 2019 14:31:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0-n=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/tools/scripts/ci/gameserver/manage.py | 2 +- server/tools/scripts/ci/masterserer/manage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/tools/scripts/ci/gameserver/manage.py b/server/tools/scripts/ci/gameserver/manage.py index 7715216..0fbe763 100755 --- a/server/tools/scripts/ci/gameserver/manage.py +++ b/server/tools/scripts/ci/gameserver/manage.py @@ -34,7 +34,7 @@ def stop(instance_id, node_id): for pid in pids: exepath = getExePath(pid) cmdline = getExeCmdLine(pid) - if cmdline == ("./gameserver\0-i\0%d\0-i\0%d\0" % (instance_id, node_id)): + if cmdline == ("./gameserver\0-i\0%d\0-n\0%d\0" % (instance_id, node_id)): os.popen('kill -9 %d' % int(pid)) def listServer(): diff --git a/server/tools/scripts/ci/masterserer/manage.py b/server/tools/scripts/ci/masterserer/manage.py index 9442517..438640a 100755 --- a/server/tools/scripts/ci/masterserer/manage.py +++ b/server/tools/scripts/ci/masterserer/manage.py @@ -34,7 +34,7 @@ def stop(instance_id, node_id): for pid in pids: exepath = getExePath(pid) cmdline = getExeCmdLine(pid) - if cmdline == ("./masterserver\0-i\0%d\0-i\0%d\0" % (instance_id, node_id)): + if cmdline == ("./masterserver\0-i\0%d\0-n\0%d\0" % (instance_id, node_id)): os.popen('kill -9 %d' % int(pid)) def listServer():