* Revert "Fix chat bubbles (#25643)" This reverts commit23d2c4d924. * Revert "Fixes obsolete Transform warnings in Content. (#25256)" This reverts commitf284b43ff6.
This commit is contained in:
@@ -17,16 +17,15 @@ namespace Content.Shared.Construction.Conditions
|
||||
public bool Condition(EntityUid user, EntityCoordinates location, Direction direction)
|
||||
{
|
||||
var entManager = IoCManager.Resolve<IEntityManager>();
|
||||
var xfmSystem = entManager.System<SharedTransformSystem>();
|
||||
|
||||
// get blueprint and user position
|
||||
var userWorldPosition = xfmSystem.GetWorldPosition(user);
|
||||
var userWorldPosition = entManager.GetComponent<TransformComponent>(user).WorldPosition;
|
||||
var objWorldPosition = location.ToMap(entManager).Position;
|
||||
|
||||
// find direction from user to blueprint
|
||||
var userToObject = (objWorldPosition - userWorldPosition);
|
||||
// get direction of the grid being placed on as an offset.
|
||||
var gridRotation = xfmSystem.GetWorldRotation(location.EntityId);
|
||||
var gridRotation = entManager.GetComponent<TransformComponent>(location.EntityId).WorldRotation;
|
||||
var directionWithOffset = gridRotation.RotateVec(direction.ToVec());
|
||||
|
||||
// dot product will be positive if user direction and blueprint are co-directed
|
||||
|
||||
@@ -127,7 +127,7 @@ public sealed partial class AnchorableSystem : EntitySystem
|
||||
|
||||
// Snap rotation to cardinal (multiple of 90)
|
||||
var rot = xform.LocalRotation;
|
||||
_transformSystem.SetLocalRotation(uid, Math.Round(rot / (Math.PI / 2)) * (Math.PI / 2), xform);
|
||||
xform.LocalRotation = Math.Round(rot / (Math.PI / 2)) * (Math.PI / 2);
|
||||
|
||||
if (TryComp<SharedPullableComponent>(uid, out var pullable) && pullable.Puller != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user