Use HashSets instead of .Distinct
And don't cast to array / list where unnecessary
This commit is contained in:
@@ -76,7 +76,7 @@ namespace OpenRA.Mods.D2k.Activities
|
||||
positionable.SetPosition(self, targetLocation);
|
||||
|
||||
var attackPosition = self.CenterPosition;
|
||||
var affectedPlayers = targets.Select(x => x.Owner).Distinct().ToList();
|
||||
var affectedPlayers = targets.Select(x => x.Owner).ToHashSet();
|
||||
Game.Sound.Play(SoundType.World, swallow.Info.WormAttackSound, self.CenterPosition);
|
||||
|
||||
foreach (var player in affectedPlayers)
|
||||
|
||||
Reference in New Issue
Block a user