fix idle handling. that was dumb.
This commit is contained in:
@@ -65,7 +65,8 @@ namespace OpenRA
|
|||||||
|
|
||||||
public void Tick()
|
public void Tick()
|
||||||
{
|
{
|
||||||
while (currentActivity != null && !(currentActivity is Idle))
|
var wasIdle = currentActivity is Idle;
|
||||||
|
while (currentActivity != null)
|
||||||
{
|
{
|
||||||
var a = currentActivity;
|
var a = currentActivity;
|
||||||
currentActivity = a.Tick(this) ?? new Idle();
|
currentActivity = a.Tick(this) ?? new Idle();
|
||||||
@@ -74,6 +75,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
if (currentActivity is Idle)
|
if (currentActivity is Idle)
|
||||||
{
|
{
|
||||||
|
if (!wasIdle)
|
||||||
foreach (var ni in traits.WithInterface<INotifyIdle>())
|
foreach (var ni in traits.WithInterface<INotifyIdle>())
|
||||||
ni.Idle(this);
|
ni.Idle(this);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user