1.控制机甲移动,角色朝向未发生改变

This commit is contained in:
aozhiwei 2021-05-17 14:32:49 +08:00
parent 37d1e84abe
commit 9be6edab64

View File

@ -1029,11 +1029,17 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
TypeConvert::FromPb(attack_dir, &msg.attack_dir()); TypeConvert::FromPb(attack_dir, &msg.attack_dir());
attack_dir.Normalize(); attack_dir.Normalize();
SetAttackDir(attack_dir); SetAttackDir(attack_dir);
if (GetCar() && GetCar()->IsDriver(this)) {
GetCar()->SetAttackDir(GetAttackDir());
}
} }
} }
} else { } else {
if (moving) { if (moving) {
SetAttackDir(GetMoveDir()); SetAttackDir(GetMoveDir());
if (GetCar() && GetCar()->IsDriver(this)) {
GetCar()->SetAttackDir(GetAttackDir());
}
} }
} }
if (moving) { if (moving) {