saner planes, part 1

This commit is contained in:
Chris Forbes
2010-03-27 00:23:24 +13:00
parent 092c9bede0
commit d2ad90aa5b
4 changed files with 54 additions and 2 deletions

View File

@@ -65,11 +65,20 @@ namespace OpenRA
public void Tick()
{
while (currentActivity != null)
while (currentActivity != null && !(currentActivity is Idle))
{
var a = currentActivity;
currentActivity = a.Tick(this) ?? new Idle();
if (a == currentActivity || currentActivity is Idle) break;
if (a == currentActivity) break;
if (currentActivity is Idle)
{
foreach (var ni in traits.WithInterface<INotifyIdle>())
ni.Idle(this);
break;
}
}
}