fix interaction between autoattack and idleanimation

This commit is contained in:
Bob
2010-11-16 10:45:36 +13:00
committed by Chris Forbes
parent 7bd7f4e56b
commit a7f42dcf0c
6 changed files with 10 additions and 11 deletions

View File

@@ -68,12 +68,11 @@ namespace OpenRA
public void Tick()
{
var wasIdle = currentActivity is Idle;
currentActivity = Util.RunActivity( this, currentActivity ) ?? new Idle();
if (currentActivity is Idle && !wasIdle)
if (currentActivity == null)
foreach (var ni in TraitsImplementing<INotifyIdle>())
ni.Idle(this);
ni.TickIdle(this);
currentActivity = Util.RunActivity( this, currentActivity );
}
public bool IsIdle