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:
@@ -42,6 +42,7 @@ public sealed partial class RevenantSystem
|
||||
[Dependency] private readonly GhostSystem _ghost = default!;
|
||||
[Dependency] private readonly TileSystem _tile = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
|
||||
private void InitializeAbilities()
|
||||
{
|
||||
@@ -227,7 +228,7 @@ public sealed partial class RevenantSystem
|
||||
var xform = Transform(uid);
|
||||
if (!TryComp<MapGridComponent>(xform.GridUid, out var map))
|
||||
return;
|
||||
var tiles = map.GetTilesIntersecting(Box2.CenteredAround(xform.WorldPosition,
|
||||
var tiles = map.GetTilesIntersecting(Box2.CenteredAround(_transformSystem.GetWorldPosition(xform),
|
||||
new Vector2(component.DefileRadius * 2, component.DefileRadius))).ToArray();
|
||||
|
||||
_random.Shuffle(tiles);
|
||||
|
||||
Reference in New Issue
Block a user