Skip to content

Commit

Permalink
Add missing return calls for positions and angles in SolveIsland (#5327)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrSmugleaf authored Aug 10, 2024
1 parent 99e4910 commit 672819d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Robust.Shared/Physics/Systems/SharedPhysicsSystem.Island.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Threading.Tasks;
using Microsoft.Extensions.ObjectPool;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Physics.Dynamics.Contacts;
Expand Down Expand Up @@ -960,6 +959,8 @@ private void SolveIsland(
}

// Cleanup
ArrayPool<Vector2>.Shared.Return(positions);
ArrayPool<float>.Shared.Return(angles);
ArrayPool<ContactVelocityConstraint>.Shared.Return(velocityConstraints);
ArrayPool<ContactPositionConstraint>.Shared.Return(positionConstraints);
}
Expand All @@ -985,7 +986,7 @@ private void FinalisePositions(int start, int end, int offset, List<PhysicsCompo

var solvedPosition = Vector2.Transform(adjustedPosition, parentInvMatrix);
solvedPositions[offset + i] = solvedPosition - xform.LocalPosition;
solvedAngles[offset + i] = angles[i] - worldRot;
solvedAngles[offset + i] = angle - worldRot;
}
}

Expand Down

0 comments on commit 672819d

Please sign in to comment.