From 8a345b8ee784063d94575c8df5e42f7f04090aab Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期三, 10 四月 2019 14:05:43 +0800
Subject: [PATCH] Merge branch 'master' into HazyRegion
---
Fight/Stage/MapEditor/Game/ClientSceneManager.cs | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/Fight/Stage/MapEditor/Game/ClientSceneManager.cs b/Fight/Stage/MapEditor/Game/ClientSceneManager.cs
index 1432eb4..bc1d41d 100644
--- a/Fight/Stage/MapEditor/Game/ClientSceneManager.cs
+++ b/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;
}
--
Gitblit v1.8.0