From 8000aa1631e8f8e8c52544eb80b5431e3d0996f2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 9 May 2019 10:06:30 +0800 Subject: [PATCH 1/5] 1 --- server/tools/protobuild/metatable.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/server/tools/protobuild/metatable.proto b/server/tools/protobuild/metatable.proto index 5c3dbb6..3d2246d 100755 --- a/server/tools/protobuild/metatable.proto +++ b/server/tools/protobuild/metatable.proto @@ -49,7 +49,6 @@ message SafeArea message Item { optional int32 id = 1; //道具id - optional int32 type = 2; //类型 } message Equip From 7aeaaef7572e707d433717fd47ca673f934d30f0 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 13 May 2019 13:53:02 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A00=E5=90=91=E9=87=8F?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gameserver/player.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 6f8d223..a5f2296 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -811,8 +811,11 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) #endif if (!a8::HasBitFlag(status, HS_Fly)) { if (msg.has_attack_dir()) { - attack_dir.FromPB(&msg.attack_dir()); - attack_dir.Normalize(); + if (std::abs(msg.attack_dir().x()) > 0.000001f || + std::abs(msg.attack_dir().y()) > 0.000001f) { + attack_dir.FromPB(&msg.attack_dir()); + attack_dir.Normalize(); + } } else { if (moving) { attack_dir = move_dir; From be1f338bd338ac8db0cf3d152f6afd608d83cb41 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 13 May 2019 13:58:10 +0800 Subject: [PATCH 3/5] 1 --- server/gameserver/player.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index a5f2296..e656c7e 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -811,10 +811,14 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) #endif if (!a8::HasBitFlag(status, HS_Fly)) { if (msg.has_attack_dir()) { - if (std::abs(msg.attack_dir().x()) > 0.000001f || - std::abs(msg.attack_dir().y()) > 0.000001f) { - attack_dir.FromPB(&msg.attack_dir()); - attack_dir.Normalize(); + if (!std::isfinite(msg.attack_dir().x()) && + !std::isfinite(msg.attack_dir().y()) && + !std::isnan(msg.attack_dir().x()) && + !std::isnan(msg.attack_dir().y()) + ) + { + attack_dir.FromPB(&msg.attack_dir()); + attack_dir.Normalize(); } } else { if (moving) { From e1d450be48c7729bef2f9ee394441c914a41899a Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 13 May 2019 14:02:53 +0800 Subject: [PATCH 4/5] 1 --- server/gameserver/player.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index e656c7e..83d83e4 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -811,10 +811,8 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) #endif if (!a8::HasBitFlag(status, HS_Fly)) { if (msg.has_attack_dir()) { - if (!std::isfinite(msg.attack_dir().x()) && - !std::isfinite(msg.attack_dir().y()) && - !std::isnan(msg.attack_dir().x()) && - !std::isnan(msg.attack_dir().y()) + if (std::isfinite(msg.attack_dir().x()) && + std::isfinite(msg.attack_dir().y()) ) { attack_dir.FromPB(&msg.attack_dir()); From 2b005852fadbffec6929c83fe2144bcc65ba6d93 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 13 May 2019 14:22:52 +0800 Subject: [PATCH 5/5] 1 --- server/gameserver/player.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 83d83e4..647932c 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -812,9 +812,12 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) if (!a8::HasBitFlag(status, HS_Fly)) { if (msg.has_attack_dir()) { if (std::isfinite(msg.attack_dir().x()) && - std::isfinite(msg.attack_dir().y()) - ) - { + std::isfinite(msg.attack_dir().y()) && + ( + std::abs(msg.attack_dir().x()) > 0.00001f || + std::abs(msg.attack_dir().y()) > 0.00001f + ) + ){ attack_dir.FromPB(&msg.attack_dir()); attack_dir.Normalize(); }