From a895e84d71a27082ce20714ca360fe88ef5ccab5 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 20 五月 2019 20:51:09 +0800
Subject: [PATCH] 3634 【2.0】【bug】飞行后打断主线寻路
---
Fight/MapTransferUtility.cs | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/Fight/MapTransferUtility.cs b/Fight/MapTransferUtility.cs
index 8d2b1f0..3444059 100644
--- a/Fight/MapTransferUtility.cs
+++ b/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("绉诲姩鑷砃PC: {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);
--
Gitblit v1.8.0