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:
@@ -6,6 +6,8 @@ namespace Content.Server.DeviceNetwork.Systems
|
||||
[UsedImplicitly]
|
||||
public sealed class WirelessNetworkSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -25,7 +27,7 @@ namespace Content.Server.DeviceNetwork.Systems
|
||||
return;
|
||||
|
||||
if (xform.MapID != args.SenderTransform.MapID
|
||||
|| (ownPosition - xform.WorldPosition).Length() > sendingComponent.Range)
|
||||
|| (ownPosition - _transformSystem.GetWorldPosition(xform)).Length() > sendingComponent.Range)
|
||||
{
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user