From 1fe68a8ef478527921b532dfce94fa600000ee86 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sun, 31 May 2015 15:08:59 +0200 Subject: [PATCH] Don't crash when trying to protect a harvester against a dead (not in world) enemy --- mods/ra/maps/allies-05a/AI.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ra/maps/allies-05a/AI.lua b/mods/ra/maps/allies-05a/AI.lua index 530528c8ce..4e2861eff2 100644 --- a/mods/ra/maps/allies-05a/AI.lua +++ b/mods/ra/maps/allies-05a/AI.lua @@ -61,8 +61,8 @@ ProtectHarvester = function(unit) local Guards = SetupAttackGroup() Utils.Do(Guards, function(unit) - if attacker.Location then - unit.AttackMove(attacker.Location) + if not self.IsDead then + unit.AttackMove(self.Location) end IdleHunt(unit) end)