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