Content update for NetEntities (#18935)
This commit is contained in:
@@ -27,16 +27,18 @@ public abstract class MovementTest : InteractionTest
|
||||
public override async Task Setup()
|
||||
{
|
||||
await base.Setup();
|
||||
var pCoords = SEntMan.GetCoordinates(PlayerCoords);
|
||||
|
||||
for (var i = -Tiles; i <= Tiles; i++)
|
||||
{
|
||||
await SetTile(Plating, PlayerCoords.Offset(new Vector2(i, 0)), MapData.MapGrid);
|
||||
await SetTile(Plating, SEntMan.GetNetCoordinates(pCoords.Offset(new Vector2(i, 0))), MapData.MapGrid);
|
||||
}
|
||||
AssertGridCount(1);
|
||||
|
||||
if (AddWalls)
|
||||
{
|
||||
await SpawnEntity("WallSolid", PlayerCoords.Offset(new Vector2(-Tiles, 0)));
|
||||
await SpawnEntity("WallSolid", PlayerCoords.Offset(new Vector2(Tiles, 0)));
|
||||
await SpawnEntity("WallSolid", pCoords.Offset(new Vector2(-Tiles, 0)));
|
||||
await SpawnEntity("WallSolid", pCoords.Offset(new Vector2(Tiles, 0)));
|
||||
}
|
||||
|
||||
await AddGravity();
|
||||
@@ -46,7 +48,7 @@ public abstract class MovementTest : InteractionTest
|
||||
/// <summary>
|
||||
/// Get the relative horizontal between two entities. Defaults to using the target & player entity.
|
||||
/// </summary>
|
||||
protected float Delta(EntityUid? target = null, EntityUid? other = null)
|
||||
protected float Delta(NetEntity? target = null, NetEntity? other = null)
|
||||
{
|
||||
target ??= Target;
|
||||
if (target == null)
|
||||
@@ -55,7 +57,7 @@ public abstract class MovementTest : InteractionTest
|
||||
return 0;
|
||||
}
|
||||
|
||||
var delta = Transform.GetWorldPosition(target.Value) - Transform.GetWorldPosition(other ?? Player);
|
||||
var delta = Transform.GetWorldPosition(SEntMan.GetEntity(target.Value)) - Transform.GetWorldPosition(SEntMan.GetEntity(other ?? Player));
|
||||
return delta.X;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user