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:
@@ -77,6 +77,8 @@ namespace Subsurface
|
||||
|
||||
public int Play(float volume = 1.0f)
|
||||
{
|
||||
if (volume <= 0.0f) return -1;
|
||||
|
||||
alSourceId = SoundManager.Play(this, volume);
|
||||
return alSourceId;
|
||||
}
|
||||
@@ -90,7 +92,9 @@ namespace Subsurface
|
||||
Vector2 relativePos = GetRelativePosition(position);
|
||||
float volume = GetVolume(relativePos, range, baseVolume);
|
||||
|
||||
alSourceId = SoundManager.Play(this, relativePos, volume, volume);
|
||||
if (volume <= 0.0f) return -1;
|
||||
|
||||
alSourceId = SoundManager.Play(this, relativePos, volume);
|
||||
|
||||
return alSourceId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user