少年修仙传客户端代码仓库
client_Hale
2019-04-10 bf4044c721fed1b9389a31aded4370610558bd52
382 跳跃点寻路逻辑修改
1个文件已修改
26 ■■■■■ 已修改文件
Fight/Stage/MapEditor/Game/ClientSceneManager.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/MapEditor/Game/ClientSceneManager.cs
@@ -276,6 +276,7 @@
    public Vector3 GetNext1(Vector3 start, Vector3 dest)
    {
        count = 0;
        m_ChkedList1.Clear();
        if (PathFinder.WalkAble(start, dest))
@@ -464,6 +465,7 @@
                var _tp = _t.transferPoints[i];
                if (PathFinder.WalkAble(next, _tp.position))
                {
                    //Debug.Log("_tp.position : " + _tp.position);
                    if (i == 0)
                    {
                        _targetPos = _t.transferPoints[_t.transferPoints.Length - 1].position;
@@ -474,19 +476,25 @@
                    }
                    m_ChkedList.Add(_t);
                    if (PathFinder.WalkAble(start, _targetPos))
                    {
                        return _targetPos;
                    }
                    else
                    {
                        _targetPos = GetNext(start, _targetPos);
                    }
                    break;
                }
            }
            if (_targetPos != Vector3.zero)
            {
                break;
            }
        }
        if (PathFinder.WalkAble(start, _targetPos))
        {
            return _targetPos;
        }
        else
        {
            _targetPos = GetNext(start, _targetPos);
        }
        //Debug.Log("_targetPos: " + _targetPos);
        return _targetPos;
    }