This commit is contained in:
aozhiwei 2024-02-14 16:15:47 +08:00
parent eb6800f64c
commit ca0834d091
2 changed files with 2 additions and 2 deletions

View File

@ -99,5 +99,5 @@ glm::vec3 GlmHelper::Vec2ToVec3(const glm::vec2& v2)
bool GlmHelper::IsValidVec3(const glm::vec3& v)
{
return !(isnan(v.x));
return !(isnan(v.x) || isnan(v.y) || isnan(v.z));
}

View File

@ -973,7 +973,7 @@ void Player::_CMMove(f8::MsgHdr* hdr, const cs::CMMove& msg)
a8::XPrintf("has_move_dir1\n", {});
#endif
if (!(HasBuffEffect(kBET_Jump) && follow_target.Get())) {
if (GetDisableMoveDirTimes() <= 0) {
if (GetDisableMoveDirTimes() <= 0 && GlmHelper::IsValidVec3(new_move_dir)) {
GlmHelper::Normalize(new_move_dir);
if (std::fabs(new_move_dir.x - GetMoveDir().x) > 0.00001f ||
std::fabs(new_move_dir.y - GetMoveDir().y) > 0.00001f ||