少年修仙传客户端代码仓库
client_Hale
2019-05-27 e396c037992fde2910fa2a8b3cd450b8a1e8bccb
Fight/MapTransferUtility.cs
@@ -858,7 +858,7 @@
        }
        // 针对挖洞对象保持距离为0
        if (npc != null && _config.Dig == 1)
        if (_config.Dig == 1)
        {
            _chkDist = 0;
        }
@@ -866,7 +866,7 @@
        // 大于配置的距离, 移动至
        if (_distSqrt > Mathf.Pow(_chkDist, 2))
        {
            _hero.MoveToPosition(_destPos, _chkDist - 0.3f, true);
            _hero.MoveToPosition(_destPos, _chkDist, true);
            if (s_OnHeroStartMoveToNPC != null)
            {
@@ -888,6 +888,13 @@
                    if (_collect != null)
                    {
                        PrepareHandler.Instance.Arrive(_collect);
                        if (_distSqrt < Mathf.Pow(_collect.NpcConfig.ModelRadius + 0.4f + GeneralDefine.CloseNpcDist, 2))
                        {
                            NPCInteractProcessor.InvokeEvent(E_NpcType.Collect, _collect.NpcConfig.NPCID, _collect.ServerInstID);
                            var _dir = MathUtility.ForwardXZ(_collect.Pos, _hero.Pos);
                            _hero.Forward = _dir;
                        }
                    }
                }
                else
@@ -1321,7 +1328,7 @@
                    {
                        if (_npc != null)
                        {
                            if (_npc is GA_NpcClientFightNorm)
                            if (_npc is GA_NpcCollect)
                            {
                                NPCInteractProcessor.InvokeEvent(E_NpcType.Func, NpcID, _npc.ServerInstID);
                            }