Fix bot harvesters crashing

This commit is contained in:
Gustas
2025-02-01 17:39:40 +02:00
committed by Paul Chote
parent 9a78f22e86
commit b6dcd8d9af

View File

@@ -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)