(a405d1aed) Check volume validity in SoundPlayer.UpdateWaterAmbience (there was a report on GameAnalytics about the method setting the gain to an invalid value) + Merge fix
This commit is contained in:
@@ -269,6 +269,13 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
movementSoundVolume = Math.Max(movementSoundVolume, movementFactor);
|
||||
if (!MathUtils.IsValid(movementSoundVolume))
|
||||
{
|
||||
string errorMsg = "Failed to update water ambience volume - submarine's movement value invalid (" + movementSoundVolume + ", sub velocity: " + sub.Velocity + ")";
|
||||
DebugConsole.Log(errorMsg);
|
||||
GameAnalyticsManager.AddErrorEventOnce("SoundPlayer.UpdateWaterAmbience:InvalidVolume", GameAnalyticsSDK.Net.EGAErrorSeverity.Error, errorMsg);
|
||||
movementSoundVolume = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (waterAmbiences.Count > 1)
|
||||
|
||||
Reference in New Issue
Block a user