diff --git a/Assets/Scripts/Common/Cars/AgentController.cs b/Assets/Scripts/Common/Cars/AgentController.cs index 00238a3..e49ebaf 100644 --- a/Assets/Scripts/Common/Cars/AgentController.cs +++ b/Assets/Scripts/Common/Cars/AgentController.cs @@ -117,6 +117,13 @@ public class AgentController : MonoBehaviour { if (pathFindEnable /*&& !FixedArmFlag*/) { + if (GetComponent()) + { + if (GetComponent().remainlenght<0.5f) + { + return; + } + } begionmove = true; var data = (PathFindingCmdArgs)obj.Data; pointhit = data.hitPoint; diff --git a/Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs b/Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs index 908f08b..11e1e22 100644 --- a/Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs +++ b/Assets/Scripts/DongYouLiQing/BaseCommander/FireRobotLayWaterHose.cs @@ -146,6 +146,7 @@ public class FireRobotLayWaterHose : MonoBehaviour if (remainlenght <= 0.5f) { agent.SetDestination(transform.position); + return; } HasUseNum = Mathf.CeilToInt(GetSelfConsumedLength() / 20); ParentLayHose.GetComponent().LineLenght = GetSelfConsumedLength();