Attempt to fix characters occasionally getting launched out of the sub at lightspeed when the sub crashes into something (even if the impact doesn't appear to be that hard): impacts don't increase the velocity of the characters above 20 units/s.
This commit is contained in:
@@ -171,7 +171,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < waveY.Length; i++)
|
||||
if (waterVolume < 1.0f) return;
|
||||
for (int i = 1; i < waveY.Length - 1; i++)
|
||||
{
|
||||
float maxDelta = Math.Max(Math.Abs(rightDelta[i]), Math.Abs(leftDelta[i]));
|
||||
if (maxDelta > Rand.Range(1.0f, 10.0f))
|
||||
|
||||
Reference in New Issue
Block a user