diff --git a/server/gameserver/player.cc b/server/gameserver/player.cc index 71b0a46..3a67735 100644 --- a/server/gameserver/player.cc +++ b/server/gameserver/player.cc @@ -1056,8 +1056,19 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) std::abs(msg.attack_dir().y()) > 0.00001f ) ){ - if (!HasBuffEffect(kBET_Vertigo) && - !(GetCar() && (GetCar()->HasBuffEffect(kBET_Vertigo) || !GetCar()->HasOil()))) { + bool can_set = true; + if (HasBuffEffect(kBET_Vertigo)) { + can_set = HasBuffEffect(kBET_AutoShot); + } else if (GetCar()) { + if (GetCar()->HasOil()) { + if (GetCar()->HasBuffEffect(kBET_Vertigo)) { + can_set = GetCar()->HasBuffEffect(kBET_AutoShot); + } + } else { + can_set = false; + } + } + if (can_set) { a8::Vec2 attack_dir; TypeConvert::FromPb(attack_dir, &msg.attack_dir()); attack_dir.Normalize(); @@ -1065,8 +1076,6 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg) if (GetCar() && GetCar()->IsDriver(this)) { GetCar()->SetAttackDir(GetAttackDir()); } - } else { - int i = 0; } } } else {