Skip to content

Commit 2377cb5

Browse files
Removes duplicate position set when splitting grids
There's nothing saying why this is this way and the blame looks like it was an oversight when replacing a bit where they set position and then rotation Please, oh Chesterton's Fence, spare me your wrath
1 parent 43a80ea commit 2377cb5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Robust.Server/Physics/GridFixtureSystem.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ private void CheckSplits(EntityUid uid, HashSet<ChunkSplitNode> dirtyNodes)
268268
newGrids[i] = newGridUid;
269269

270270
// Keep same origin / velocity etc; this makes updating a lot faster and easier.
271-
_xformSystem.SetWorldPosition((newGridUid, newGridXform), gridPos);
272-
_xformSystem.SetWorldPositionRotation(newGridUid, gridPos, gridRot, newGridXform); // Why do we set this twice???
271+
_xformSystem.SetWorldPositionRotation(newGridUid, gridPos, gridRot, newGridXform);
273272
var splitBody = _bodyQuery.GetComponent(newGridUid);
274273
_physics.SetLinearVelocity(newGridUid, mapBody.LinearVelocity, body: splitBody);
275274
_physics.SetAngularVelocity(newGridUid, mapBody.AngularVelocity, body: splitBody);

0 commit comments

Comments
 (0)