fix 在定身时候,无法左右调整朝向

This commit is contained in:
aozhiwei 2021-05-13 14:16:27 +08:00
parent 79f1f5d793
commit 66f93388bd

View File

@ -1008,9 +1008,11 @@ void Player::_CMMove(f8::MsgHdr& hdr, const cs::CMMove& msg)
a8::Vec2 old_move_dir;
a8::Vec2 new_move_dir;
TypeConvert::FromPb(new_move_dir, &msg.move_dir());
new_move_dir.Normalize();
SetMoveDir(new_move_dir);
moving = true;
if (!HasBuffEffect(kBET_Vertigo)) {
new_move_dir.Normalize();
SetMoveDir(new_move_dir);
moving = true;
}
}
}
assert(!isnan(GetMoveDir().x) && !isnan(GetMoveDir().y));