Add another try-catch to avoid Destination array was not long enough. Check the destination index, length, and the array's lower bounds issue
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using Barotrauma.Extensions;
|
using Barotrauma.Extensions;
|
||||||
using Barotrauma.Items.Components;
|
using Barotrauma.Items.Components;
|
||||||
|
using Barotrauma.Networking;
|
||||||
using FarseerPhysics;
|
using FarseerPhysics;
|
||||||
using FarseerPhysics.Common;
|
using FarseerPhysics.Common;
|
||||||
using FarseerPhysics.Dynamics;
|
using FarseerPhysics.Dynamics;
|
||||||
@@ -426,7 +427,17 @@ namespace Barotrauma
|
|||||||
if (points[0].Y > Body.SimPosition.Y &&
|
if (points[0].Y > Body.SimPosition.Y &&
|
||||||
!Character.CharacterList.Any(c => c.Submarine == otherSubmarine && !c.IsIncapacitated && c.TeamID == otherSubmarine.TeamID))
|
!Character.CharacterList.Any(c => c.Submarine == otherSubmarine && !c.IsIncapacitated && c.TeamID == otherSubmarine.TeamID))
|
||||||
{
|
{
|
||||||
otherSubmarine.GetConnectedSubs().ToList().ForEach(s => s.SubBody.forceUpwardsTimer += deltaTime);
|
try
|
||||||
|
{
|
||||||
|
otherSubmarine.GetConnectedSubs().ToList().ForEach(s => s.SubBody.forceUpwardsTimer += deltaTime);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
#if SERVER
|
||||||
|
GameServer.Log("Try making UniqueEvents snapshot failed", ServerLog.MessageType.Error);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user