fix: Removes run flag from NPC movement (#1357)

This commit is contained in:
Kamron Batman 2023-03-02 10:58:17 -08:00 • committed by GitHub
parent 0150e1a994
commit 57ff488d51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 10 deletions

View file

@ -102,14 +102,14 @@ namespace Server
if (!(Enabled && m_Path.Success))
{
d = m_From.GetDirectionTo(goal, run);
d = m_From.GetDirectionTo(goal);
m_From.SetDirection(d);
Move(d);
return Check(m_From.Location, goal, range);
}
d = m_From.GetDirectionTo(m_Next, run);
d = m_From.GetDirectionTo(m_Next);
m_From.SetDirection(d);
var res = Move(d);
@ -123,16 +123,16 @@ namespace Server
m_Path = null;
CheckPath();
if (!m_Path.Success)
if (!m_Path!.Success)
{
d = m_From.GetDirectionTo(goal, run);
d = m_From.GetDirectionTo(goal);
m_From.SetDirection(d);
Move(d);
return Check(m_From.Location, goal, range);
}
d = m_From.GetDirectionTo(m_Next, run);
d = m_From.GetDirectionTo(m_Next);
m_From.SetDirection(d);
if (Move(d) == MoveResult.Blocked)