This commit is contained in:
aozhiwei 2024-09-24 11:34:00 +08:00
parent 634750dcc2
commit b7279a098b

View File

@ -1286,7 +1286,11 @@ void Player::_CMMove(f8::MsgHdr* hdr, const cs::CMMove& msg)
} else {
skill_dir = GlmHelper::ZERO;
}
TypeConvert::FromPb(*current_pos_.get(), &msg.current_pos());
if (msg.has_current_pos()) {
TypeConvert::FromPb(*current_pos_.get(), &msg.current_pos());
} else {
*current_pos_ = GetPos().ToGlmVec3();
}
skill_distance = msg.skill_distance();
} else {
use_skill = false;