This commit is contained in:
aozhiwei 2024-09-10 10:33:28 +08:00
parent 3f77a2cfb9
commit 79279cc2fb

View File

@ -2700,14 +2700,15 @@ void Creature::UpdateMove()
room->IsSandTableRoom()) {
} else {
if (IsPlayer() || HasBuffEffect(kBET_Sprint)) {
GetMovement()->CalcTargetPos(mt::Param::s().move_step_len);
if (!GetMovement()->UpdatePosition()) {
GetMovement()->CalcTargetPos(mt::Param::s().move_step_len);
if (HasBuffEffect(kBET_Sprint)) {
SprintBuff* buff = (SprintBuff*)GetBuffByEffectId(kBET_Sprint);
if (buff) {
buff->SprintEnd();
}
} else if (IsPlayer()) {
} else if (IsPlayer() && !AsPlayer()->is_client_move) {
GetMovement()->CalcTargetPos(mt::Param::s().move_step_len);
ShortFindPath();
}
}
@ -2957,6 +2958,7 @@ void Creature::OnLand()
}
#endif
if (IsPlayer()) {
AsPlayer()->SyncServerPos(1);
AsHuman()->StartRefreshViewTimer();
}
{