|
@@ -260,7 +260,7 @@ namespace CommonAI.Zone.Instance
|
|
|
/// </summary>
|
|
|
public virtual void guard()
|
|
|
{
|
|
|
- if(mHateSystem != null)
|
|
|
+ if(mHateSystem != null && mHateSystem.Count > 0)
|
|
|
{
|
|
|
if (followAndAttack(mHateSystem.GetHated(), AttackReason.Tracing))
|
|
|
{
|
|
@@ -279,13 +279,10 @@ namespace CommonAI.Zone.Instance
|
|
|
changeState(this.mRunningPath);
|
|
|
return;
|
|
|
}
|
|
|
- if (mHateSystem != null)
|
|
|
+ if (Moveable && MoveSpeedSEC > 0)
|
|
|
{
|
|
|
- if (mHateSystem.Count == 0)
|
|
|
- {
|
|
|
- guardInPosition(mOrginPosition);
|
|
|
- return;
|
|
|
- }
|
|
|
+ guardInPosition(mOrginPosition);
|
|
|
+ return;
|
|
|
}
|
|
|
base.startIdle();
|
|
|
}
|