少年修仙传客户端代码仓库
hch
2025-06-12 a9fdd65579003ef3c95e64d96cc97b1d19b528ba
0312 移动输出
2个文件已修改
18 ■■■■■ 已修改文件
Fight/GameActor/GActor.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/MapTransferUtility.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActor.cs
@@ -408,19 +408,16 @@
         && MathUtility.DistanceSqrtXZ(DestPos, destPos) < 0.01f
         && !force)
        {
            Debug.LogFormat("3333333 想要切换至目标npc: {0}", destPos);
            Run();
            return;
        }
        DestPos = destPos;
        Debug.LogFormat("44444444444 想要切换至目标npc: {0}", destPos);
        Vector3 _validPos = Pos;
        if (TryGetValidPos(destPos, ref _validPos))
        {
            DestPos = _validPos;
            m_SearchType = E_SearchType.Static;
            Debug.LogFormat("55555555 想要切换至目标npc: {0}", DestPos);
            MoveTo(_validPos, keepDist);
        }
    }
@@ -490,7 +487,10 @@
    {
        Vector3 _curPos = Pos;
        _curPos.y = 0;
        Debug.LogFormat("6666666 想要切换至目标npc: {0}  {1}", position, m_Path);
        try
        {
        if (NavMesh.CalculatePath(_curPos, position, NavMesh.AllAreas, m_Path))
        {
            m_CornerIndex = 0;
@@ -502,7 +502,7 @@
            }
            Run();
            State = E_ActorState.AutoRun;
                Debug.LogFormat("77777777 想要切换至目标npc: {0}", position);
            // if (this is GActorNpcFight
            //  && (ServerInstID == 133 || ServerInstID == 134 || ServerInstID == 112))
            // {
@@ -510,6 +510,13 @@
            // }
        }
    }
        catch (System.Exception e)
        {
            Debug.LogError("NavMeshPath error: " + e.Message);
            return;
        }
    }
    public static bool TryGetValidPos(Vector3 position, ref Vector3 validPosition)
    {
Fight/MapTransferUtility.cs
@@ -245,7 +245,6 @@
#if UNITY_EDITOR
        Debug.LogFormat("想要切换至目标npc: {0}", _npcID);
#endif
        Debug.LogFormat("想要切换至目标npc: {0}", _npcID);
        StopCoroutine("CoMoveToNPC");
        var _data = new MoveToData
        {
@@ -283,7 +282,6 @@
                yield break;
            }
        }
        Debug.LogFormat("111111111 想要切换至目标npc: {0}", NpcID);
        // 判断是否能够得到到达指定点
        // 获取NPC位置数据
        GAStaticDefine.NPCLocation _npcLocation;
@@ -300,7 +298,6 @@
            if (_npc != null)
            {
                _destPostion = _npc.Pos;
                Debug.LogFormat("222222222 想要切换至目标npc: {0}", _destPostion);
                NpcID = NpcID;
                MapTransferDoType = E_MapTransferDoType.Npc;