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:
@@ -11,6 +11,7 @@ namespace Content.Client.Stealth;
|
||||
public sealed class StealthSystem : SharedStealthSystem
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _protoMan = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
|
||||
private ShaderInstance _shader = default!;
|
||||
|
||||
@@ -81,7 +82,7 @@ public sealed class StealthSystem : SharedStealthSystem
|
||||
if (!parent.IsValid())
|
||||
return; // should never happen, but lets not kill the client.
|
||||
var parentXform = Transform(parent);
|
||||
var reference = args.Viewport.WorldToLocal(parentXform.WorldPosition);
|
||||
var reference = args.Viewport.WorldToLocal(_transformSystem.GetWorldPosition(parentXform));
|
||||
reference.X = -reference.X;
|
||||
var visibility = GetVisibility(uid, component);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user