Merge pull request #624 from EricksOliveira/patch-7

Fix Crash The Nexux
This commit is contained in:
Revision
2024-10-19 22:14:01 +02:00
committed by GitHub

View File

@@ -54,9 +54,16 @@ bool FirebombSpreadAction::Execute(Event event)
{
continue;
}
if (bot->GetExactDist2d(botAI->GetUnit(member)) < targetDist)
Unit* unit = botAI->GetUnit(member);
if (!unit)
{
return MoveAway(botAI->GetUnit(member), targetDist);
continue;
}
if (bot->GetExactDist2d(unit) < targetDist)
{
return MoveAway(unit, targetDist);
}
}
return false;