1
This commit is contained in:
parent
b4fd0bb29c
commit
03527680b0
@ -2701,8 +2701,8 @@ void Creature::UpdateMove()
|
||||
} else {
|
||||
if (IsPlayer() || HasBuffEffect(kBET_Sprint)) {
|
||||
if (!GetMovement()->UpdatePosition()) {
|
||||
GetMovement()->CalcTargetPos(mt::Param::s().move_step_len);
|
||||
if (HasBuffEffect(kBET_Sprint)) {
|
||||
GetMovement()->CalcTargetPos(mt::Param::s().move_step_len);
|
||||
SprintBuff* buff = (SprintBuff*)GetBuffByEffectId(kBET_Sprint);
|
||||
if (buff) {
|
||||
buff->SprintEnd();
|
||||
|
@ -402,7 +402,11 @@ bool Movement::MoveToPos(const glm::vec3& target_pos)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (GlmHelper::IsEqual2D(point.tar_pos.ToGlmVec3(), owner_->GetPos().ToGlmVec3())) {
|
||||
return true;
|
||||
}
|
||||
glm::vec3 dir = point.tar_pos.ToGlmVec3() - owner_->GetPos().ToGlmVec3();
|
||||
|
||||
GlmHelper::Normalize(dir);
|
||||
point.dir.x = dir.x;
|
||||
point.dir.y = dir.y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user