Fix anchoring? Maybe? (#3974)
This commit is contained in:
@@ -89,8 +89,6 @@ namespace Content.Server.GameObjects.Components
|
|||||||
if (attempt.Cancelled)
|
if (attempt.Cancelled)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
_physicsComponent.BodyType = BodyType.Static;
|
|
||||||
|
|
||||||
// Snap rotation to cardinal (multiple of 90)
|
// Snap rotation to cardinal (multiple of 90)
|
||||||
var rot = Owner.Transform.LocalRotation;
|
var rot = Owner.Transform.LocalRotation;
|
||||||
Owner.Transform.LocalRotation = Math.Round(rot / (Math.PI / 2)) * (Math.PI / 2);
|
Owner.Transform.LocalRotation = Math.Round(rot / (Math.PI / 2)) * (Math.PI / 2);
|
||||||
@@ -106,6 +104,8 @@ namespace Content.Server.GameObjects.Components
|
|||||||
if (Snap)
|
if (Snap)
|
||||||
Owner.SnapToGrid(Owner.EntityManager);
|
Owner.SnapToGrid(Owner.EntityManager);
|
||||||
|
|
||||||
|
_physicsComponent.BodyType = BodyType.Static;
|
||||||
|
|
||||||
Owner.EntityManager.EventBus.RaiseLocalEvent(Owner.Uid, new AnchoredMessage(), false);
|
Owner.EntityManager.EventBus.RaiseLocalEvent(Owner.Uid, new AnchoredMessage(), false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user