fix a crash in AmbientSound
This commit is contained in:
@@ -24,10 +24,10 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
public AmbientSound(Actor self, AmbientSoundInfo info)
|
public AmbientSound(Actor self, AmbientSoundInfo info)
|
||||||
{
|
{
|
||||||
if (self == self.World.WorldActor)
|
if (self.HasTrait<IOccupySpace>())
|
||||||
Sound.PlayLooped(info.SoundFile);
|
|
||||||
else
|
|
||||||
Sound.PlayLooped(info.SoundFile, self.CenterPosition);
|
Sound.PlayLooped(info.SoundFile, self.CenterPosition);
|
||||||
|
else
|
||||||
|
Sound.PlayLooped(info.SoundFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user