1
This commit is contained in:
parent
88258b5371
commit
47734c0917
@ -1056,8 +1056,19 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
|
|||||||
std::abs(msg.attack_dir().y()) > 0.00001f
|
std::abs(msg.attack_dir().y()) > 0.00001f
|
||||||
)
|
)
|
||||||
){
|
){
|
||||||
if (!HasBuffEffect(kBET_Vertigo) &&
|
bool can_set = true;
|
||||||
!(GetCar() && (GetCar()->HasBuffEffect(kBET_Vertigo) || !GetCar()->HasOil()))) {
|
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;
|
a8::Vec2 attack_dir;
|
||||||
TypeConvert::FromPb(attack_dir, &msg.attack_dir());
|
TypeConvert::FromPb(attack_dir, &msg.attack_dir());
|
||||||
attack_dir.Normalize();
|
attack_dir.Normalize();
|
||||||
@ -1065,8 +1076,6 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
|
|||||||
if (GetCar() && GetCar()->IsDriver(this)) {
|
if (GetCar() && GetCar()->IsDriver(this)) {
|
||||||
GetCar()->SetAttackDir(GetAttackDir());
|
GetCar()->SetAttackDir(GetAttackDir());
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
int i = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user