mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 00:36:07 +00:00
fix(Core/Unit): rework Walk/Run mode (#22988)
Co-authored-by: sudlud <sudlud@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -442,7 +442,7 @@ void Map::ScriptsProcess()
|
||||
if (step.script->MoveTo.TravelTime != 0)
|
||||
{
|
||||
float speed = unit->GetDistance(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ) / ((float)step.script->MoveTo.TravelTime * 0.001f);
|
||||
unit->MonsterMoveWithSpeed(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, speed);
|
||||
unit->GetMotionMaster()->MovePoint(0, step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, FORCED_MOVEMENT_NONE, speed);
|
||||
}
|
||||
else
|
||||
unit->NearTeleportTo(step.script->MoveTo.DestX, step.script->MoveTo.DestY, step.script->MoveTo.DestZ, unit->GetOrientation());
|
||||
|
||||
Reference in New Issue
Block a user