3d76e16...b52f40e
commit b52f40e6bb736069c945dd0028b39f39722ad0f5 Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Tue Mar 19 11:33:57 2019 +0200 Fixed non-radio chat/VOIP having an unlimited distance. Closes #1291 commit 5e3bafed4528d36dd05968300aa01531377355f8 Author: Joonas Rikkonen <poe.regalis@gmail.com> Date: Tue Mar 19 00:19:11 2019 +0200 Modifications to the private->public merge script
This commit is contained in:
@@ -129,10 +129,10 @@ namespace Barotrauma.Networking
|
||||
if (listener.WorldPosition == sender.WorldPosition) { return 0.0f; }
|
||||
|
||||
float dist = Vector2.Distance(listener.WorldPosition, sender.WorldPosition);
|
||||
if (dist > range) { return 0.0f; }
|
||||
if (dist > range) { return 1.0f; }
|
||||
|
||||
if (Submarine.CheckVisibility(listener.SimPosition, sender.SimPosition) != null) dist = (dist + 100f) * obstructionmult;
|
||||
if (dist > range) { return 0.0f; }
|
||||
if (dist > range) { return 1.0f; }
|
||||
|
||||
return dist / range;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ namespace Barotrauma.Networking
|
||||
public static string ApplyDistanceEffect(string text, float garbleAmount)
|
||||
{
|
||||
if (garbleAmount < 0.3f) return text;
|
||||
if (garbleAmount > 1.0f) return "";
|
||||
if (garbleAmount >= 1.0f) return "";
|
||||
|
||||
int startIndex = Math.Max(text.IndexOf(':') + 1, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user