From b6dcd8d9afa6fe91018b61d225cb42397badb162 Mon Sep 17 00:00:00 2001 From: Gustas <37534529+PunkPun@users.noreply.github.com> Date: Sat, 1 Feb 2025 17:39:40 +0200 Subject: [PATCH] Fix bot harvesters crashing --- 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 33b1c45764..94dadd378d 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/HarvesterBotModule.cs @@ -173,7 +173,7 @@ namespace OpenRA.Mods.Common.Traits // Returns true if FindNextResource was called. bool HarvestIfAble(IBot bot, HarvesterTraitWrapper h) { - if (h.Mobile == null) + if (h.Actor.IsDead || !h.Actor.IsInWorld || h.Mobile == null) return false; if (!h.Actor.IsIdle)