Don't crash when putting the trait on the World actor.
This commit is contained in:
committed by
reaperrr
parent
3ab4a584ab
commit
672bd2d9fe
@@ -52,13 +52,16 @@ namespace OpenRA.Mods.Common.Traits.Sound
|
||||
|
||||
currentSounds.RemoveWhere(s => s == null || s.Complete);
|
||||
|
||||
var pos = self.CenterPosition;
|
||||
if (pos != cachedPosition)
|
||||
if (self.OccupiesSpace != null)
|
||||
{
|
||||
foreach (var s in currentSounds)
|
||||
s.SetPosition(pos);
|
||||
var pos = self.CenterPosition;
|
||||
if (pos != cachedPosition)
|
||||
{
|
||||
foreach (var s in currentSounds)
|
||||
s.SetPosition(pos);
|
||||
|
||||
cachedPosition = pos;
|
||||
cachedPosition = pos;
|
||||
}
|
||||
}
|
||||
|
||||
if (delay < 0)
|
||||
|
||||
Reference in New Issue
Block a user