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:
@@ -23,6 +23,7 @@ public sealed class TargetOutlineSystem : EntitySystem
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
|
||||
private bool _enabled = false;
|
||||
|
||||
@@ -165,8 +166,8 @@ public sealed class TargetOutlineSystem : EntitySystem
|
||||
valid = _interactionSystem.InRangeUnobstructed(player, entity, Range);
|
||||
else if (Range >= 0)
|
||||
{
|
||||
var origin = Transform(player).WorldPosition;
|
||||
var target = Transform(entity).WorldPosition;
|
||||
var origin = _transformSystem.GetWorldPosition(player);
|
||||
var target = _transformSystem.GetWorldPosition(entity);
|
||||
valid = (origin - target).LengthSquared() <= Range;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user