(052ab6307) Use MonoKickstart on Linux so installing Mono is not required, fixed division by zero if the width of the server console window is 0

This commit is contained in:
Joonas Rikkonen
2019-04-16 17:11:49 +03:00
parent edb8c39c58
commit bd07acf26d
121 changed files with 1546 additions and 1777 deletions
@@ -39,33 +39,25 @@ namespace Barotrauma.Networking
public void UpdateSoundPosition()
{
if (VoipSound == null) { return; }
if (!VoipSound.IsPlaying)
if (VoipSound != null)
{
DebugConsole.Log("Destroying voipsound");
VoipSound.Dispose();
VoipSound = null;
return;
}
if (!VoipSound.IsPlaying)
{
DebugConsole.Log("Destroying voipsound");
VoipSound.Dispose();
VoipSound = null;
return;
}
if (character != null)
{
if (GameMain.Config.UseDirectionalVoiceChat)
if (character != null)
{
VoipSound.SetPosition(new Vector3(character.WorldPosition.X, character.WorldPosition.Y, 0.0f));
}
else
{
VoipSound.SetPosition(null);
float dist = Vector3.Distance(new Vector3(character.WorldPosition, 0.0f), GameMain.SoundManager.ListenerPosition);
VoipSound.Gain = 1.0f - MathUtils.InverseLerp(VoipSound.Near, VoipSound.Far, dist);
}
}
else
{
VoipSound.SetPosition(null);
}
}
partial void InitProjSpecific()