From c8b1c1b999a1bd65d4cbbb71a6299ea32d0e5f52 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 13 Oct 2012 13:42:34 +1300 Subject: [PATCH] tidy slightly in idle harv handler --- OpenRA.Mods.RA/AI/HackyAI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index 2d741ecdca..c3581c3d35 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -269,8 +269,8 @@ namespace OpenRA.Mods.RA.AI { Activity act = a.GetCurrentActivity(); // A Wait activity is technically idle: - if ((act.GetType() != typeof(OpenRA.Mods.RA.Activities.Wait)) && - (act.NextActivity == null || act.NextActivity.GetType() != typeof(OpenRA.Mods.RA.Activities.FindResources))) + if (!(act is Activities.Wait) && + (act.NextActivity == null || !(act.NextActivity is Activities.FindResources))) continue; } if (!harv.IsEmpty) continue;