少年修仙传客户端代码仓库
client_Hale
2019-05-20 a895e84d71a27082ce20714ca360fe88ef5ccab5
3634 【2.0】【bug】飞行后打断主线寻路
1个文件已修改
30 ■■■■■ 已修改文件
Fight/MapTransferUtility.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/MapTransferUtility.cs
@@ -299,6 +299,35 @@
                NpcID = NpcID;
                MapTransferDoType = E_MapTransferDoType.Npc;
                while (true)
                {
                    if (PathFinder.WalkAble(_hero.Pos, _destPostion))
                    {
                        break;
                    }
                    Vector3 _nextPos;
                    if (!ClientSceneManager.Instance.AAA(_hero.Pos, _destPostion, out _nextPos))
                    {
                        Debug.LogErrorFormat("移动至NPC: {0} 时找不到任何跳跃点, NextPos: {1}", NpcID, _nextPos);
                        break;
                    }
                    float _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
                    while (_dis > 0.01f)
                    {
                        _dis = MathUtility.DistanceSqrtXZ(_hero.Pos, _nextPos);
                        _hero.MoveToPosition(_nextPos);
                        yield return null;
                    }
                    while (!GA_Hero.s_Flying)
                    {
                        yield return null;
                    }
                    while (GA_Hero.s_Flying)
                    {
                        yield return null;
                    }
                }
                _hero.MoveToPosition(_destPostion, 1);
                yield break;
            }
@@ -787,6 +816,7 @@
    private void MoveToExistNpc(int npcID, GActor npc)
    {
        GA_Hero _hero = PlayerDatas.Instance.hero;
        Debug.Log("11111111111111");
        NPCConfig _config = NPCConfig.Get(npcID);