Check team members' health in Team.Do function

This commit is contained in:
Oliver Brakmann
2014-06-03 20:02:55 +02:00
parent ff8e19e9e2
commit 3a2bb75e01

View File

@@ -57,7 +57,11 @@ Team.Contains = function(team, actor)
end
Team.Do = function(team, func)
Utils.Do(team.Actors, func)
Utils.Do(team.Actors, function(actor)
if not Actor.IsDead(actor) then
func(actor)
end
end)
end
Team.Patrol = function(team, waypoints, wait, loop)