fix a crash in AmbientSound

This commit is contained in:
Matthias Mailänder
2015-05-03 22:17:27 +02:00
parent a753a114a0
commit 24444d4af3

View File

@@ -24,10 +24,10 @@ namespace OpenRA.Mods.Common.Traits
{
public AmbientSound(Actor self, AmbientSoundInfo info)
{
if (self == self.World.WorldActor)
Sound.PlayLooped(info.SoundFile);
else
if (self.HasTrait<IOccupySpace>())
Sound.PlayLooped(info.SoundFile, self.CenterPosition);
else
Sound.PlayLooped(info.SoundFile);
}
}
}