Replace xform.WorldPosition with xformSystem method for Setting/Getting (#30029)
* GET WORLD POSITON, ROTATION * Missing parentheses * ui system depndency * the issue * Unused * Let the function do the transform --------- Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Singularity.Events;
|
||||
using Content.Shared.Popups;
|
||||
@@ -13,6 +13,7 @@ public sealed class ContainmentFieldSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -34,8 +35,8 @@ public sealed class ContainmentFieldSystem : EntitySystem
|
||||
|
||||
if (TryComp<PhysicsComponent>(otherBody, out var physics) && physics.Mass <= component.MaxMass && physics.Hard)
|
||||
{
|
||||
var fieldDir = Transform(uid).WorldPosition;
|
||||
var playerDir = Transform(otherBody).WorldPosition;
|
||||
var fieldDir = _transformSystem.GetWorldPosition(uid);
|
||||
var playerDir = _transformSystem.GetWorldPosition(otherBody);
|
||||
|
||||
_throwing.TryThrow(otherBody, playerDir-fieldDir, baseThrowSpeed: component.ThrowForce);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user