From 8690a4a6ce5e595f29f3d5859cb58b6fa9775c4c Mon Sep 17 00:00:00 2001 From: tovl Date: Fri, 9 Aug 2019 23:43:08 +0200 Subject: [PATCH] CLean up type check in harvesterbotmodule. --- OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs index a57207f912..5b4d16c5fc 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs @@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Traits if (!h.Key.IsIdle) { var act = h.Key.CurrentActivity; - if (!h.Value.Harvester.LastSearchFailed || act.NextActivity == null || act.NextActivity.GetType() != typeof(FindAndDeliverResources)) + if (!h.Value.Harvester.LastSearchFailed || act.NextActivity == null || !(act.NextActivity is FindAndDeliverResources)) continue; }