v0.12.0.2
This commit is contained in:
@@ -75,7 +75,7 @@ namespace Barotrauma
|
||||
particleRotation = -item.body.Rotation;
|
||||
if (item.body.Dir < 0.0f) { particleRotation += MathHelper.Pi; }
|
||||
}
|
||||
else if (entity is Character c && targetLimbs?.FirstOrDefault(l => l != LimbType.None) is LimbType l)
|
||||
else if (entity is Character c && !c.Removed && targetLimbs?.FirstOrDefault(l => l != LimbType.None) is LimbType l)
|
||||
{
|
||||
targetLimb = c.AnimController.GetLimb(l);
|
||||
}
|
||||
@@ -95,6 +95,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
private bool ignoreMuffling;
|
||||
|
||||
private void PlaySound(Entity entity, Hull hull, Vector2 worldPosition)
|
||||
{
|
||||
if (sounds.Count == 0) return;
|
||||
@@ -111,7 +113,8 @@ namespace Barotrauma
|
||||
GameAnalyticsManager.AddErrorEventOnce("StatusEffect.ApplyProjSpecific:SoundNull1" + Environment.StackTrace.CleanupStackTrace(), GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg);
|
||||
return;
|
||||
}
|
||||
soundChannel = SoundPlayer.PlaySound(sound.Sound, worldPosition, sound.Volume, sound.Range, hullGuess: hull);
|
||||
soundChannel = SoundPlayer.PlaySound(sound.Sound, worldPosition, sound.Volume, sound.Range, hullGuess: hull, ignoreMuffling: sound.IgnoreMuffling);
|
||||
ignoreMuffling = sound.IgnoreMuffling;
|
||||
if (soundChannel != null) { soundChannel.Looping = loopSound; }
|
||||
}
|
||||
}
|
||||
@@ -141,7 +144,8 @@ namespace Barotrauma
|
||||
{
|
||||
Submarine.ReloadRoundSound(selectedSound);
|
||||
}
|
||||
soundChannel = SoundPlayer.PlaySound(selectedSound.Sound, worldPosition, selectedSound.Volume, selectedSound.Range, hullGuess: hull);
|
||||
soundChannel = SoundPlayer.PlaySound(selectedSound.Sound, worldPosition, selectedSound.Volume, selectedSound.Range, hullGuess: hull, ignoreMuffling: selectedSound.IgnoreMuffling);
|
||||
ignoreMuffling = selectedSound.IgnoreMuffling;
|
||||
if (soundChannel != null) { soundChannel.Looping = loopSound; }
|
||||
}
|
||||
}
|
||||
@@ -176,7 +180,7 @@ namespace Barotrauma
|
||||
else
|
||||
{
|
||||
statusEffect.soundChannel.Position = new Vector3(statusEffect.soundEmitter.WorldPosition, 0.0f);
|
||||
if (doMuffleCheck)
|
||||
if (doMuffleCheck && !statusEffect.ignoreMuffling)
|
||||
{
|
||||
statusEffect.soundChannel.Muffled = SoundPlayer.ShouldMuffleSound(
|
||||
Character.Controlled, statusEffect.soundEmitter.WorldPosition, statusEffect.soundChannel.Far, Character.Controlled?.CurrentHull);
|
||||
|
||||
Reference in New Issue
Block a user