CLean up type check in harvesterbotmodule.

This commit is contained in:
tovl
2019-08-09 23:43:08 +02:00
committed by Paul Chote
parent 1b4ab564fe
commit 8690a4a6ce

View File

@@ -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;
}