From 29bb2084f72a376fd08e3cf9d368c7679a5cbc93 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 5 Mar 2024 20:45:33 +0800 Subject: [PATCH] 1 --- server/gameserver/player.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index d0d41a38..6c2932c5 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -1038,7 +1038,7 @@ void Player::_CMMove(f8::MsgHdr* hdr, const cs::CMMove& msg) } } } -#ifdef MYDEBUG1 +#ifdef MYDEBUG a8::XPrintf("attack_dir:%f,%f,%f cli_dir:%f,%f,%f\n", { GetAttackDir().x, @@ -1060,9 +1060,13 @@ void Player::_CMMove(f8::MsgHdr* hdr, const cs::CMMove& msg) a8::XPrintf("moving:%d times:%d\n", {moving ? 1 : 0, GetDisableAttackDirTimes()}); #endif if (moving && GetDisableAttackDirTimes() <= 0) { + #if 1 + SetAttackDir(GetMoveDir()); + #else if (!HasBuffEffect(kBET_HoldShield)) { SetAttackDir(GetMoveDir()); } + #endif if (GetCar() && GetCar()->IsDriver(this)) { if (!GetCar()->HasBuffEffect(kBET_Sprint)) { GetCar()->SetAttackDir(GetAttackDir());