More accurate and reliable submarine-level collisions, looping OnUse sounds bugfix, new music clips, item sprites removed from limbs when someone else loots the item, Camera.WorldView fix, checking vector.LengthSquared before normalizing to avoid creating a NaN vector
This commit is contained in:
@@ -277,12 +277,12 @@ namespace Subsurface.Items.Components
|
||||
private int loopingSoundIndex;
|
||||
public void PlaySound(ActionType type, Vector2 position)
|
||||
{
|
||||
List<ItemSound> matchingSounds = sounds.FindAll(x => x.Type == type);
|
||||
if (matchingSounds.Count == 0) return;
|
||||
|
||||
ItemSound itemSound = null;
|
||||
if (!Sounds.SoundManager.IsPlaying(loopingSoundIndex))
|
||||
{
|
||||
List<ItemSound> matchingSounds = sounds.FindAll(x => x.Type == type);
|
||||
if (matchingSounds.Count == 0) return;
|
||||
|
||||
int index = Rand.Int(matchingSounds.Count);
|
||||
itemSound = matchingSounds[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user