This commit is contained in:
aozhiwei 2019-12-03 19:53:29 +08:00
parent 374f478dc5
commit 13d980d507
2 changed files with 1 additions and 1 deletions

View File

@ -565,6 +565,7 @@ void Human::_UpdateMove(int speed)
{ {
a8::Vec2 old_pos = head_->pos; a8::Vec2 old_pos = head_->pos;
head_->pos = head_->pos + move_dir * head_->speed; head_->pos = head_->pos + move_dir * head_->speed;
head_->dir = move_dir;
} }
{ {
for (auto& node : body_list) { for (auto& node : body_list) {

View File

@ -88,7 +88,6 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
a8::Vec2 old_move_dir; a8::Vec2 old_move_dir;
TypeConvert::FromPb(move_dir, &msg.move_dir()); TypeConvert::FromPb(move_dir, &msg.move_dir());
move_dir.Normalize(); move_dir.Normalize();
attack_dir = move_dir;
moving = true; moving = true;
} }
} }