Add an IsDead check to prevent crashes in survival01

This commit is contained in:
abcdefg30
2016-07-18 18:55:21 +02:00
parent 00c6260ec2
commit 308a1a72b3

View File

@@ -66,6 +66,7 @@ SovietBuildings = { Barrack1, SubPen, RadarDome, AdvancedPowerPlant1, AdvancedPo
IdleTrigger = function(units, dest)
Utils.Do(units, function(unit)
if not unit.IsDead then
Trigger.OnIdle(unit, function()
local bool = Utils.All(units, function(unit) return unit.IsIdle end)
if bool then
@@ -80,6 +81,7 @@ IdleTrigger = function(units, dest)
Trigger.OnCapture(unit, function()
Trigger.ClearAll(unit)
end)
end
end)
end