mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
Final grid movement optimisation (#2711)
This commit is contained in:
@@ -35,8 +35,8 @@ namespace Robust.UnitTesting.Shared.Map
|
||||
gridId2 = mapManager.CreateGrid(mapId);
|
||||
gridEnt1 = gridId1.GridEntityId;
|
||||
gridEnt2 = gridId2.GridEntityId;
|
||||
physics1 = IoCManager.Resolve<IEntityManager>().GetComponent<PhysicsComponent>(gridEnt1.Value);
|
||||
physics2 = IoCManager.Resolve<IEntityManager>().GetComponent<PhysicsComponent>(gridEnt2.Value);
|
||||
physics1 = entManager.GetComponent<PhysicsComponent>(gridEnt1.Value);
|
||||
physics2 = entManager.GetComponent<PhysicsComponent>(gridEnt2.Value);
|
||||
// Can't collide static bodies and grids (at time of this writing) start as static
|
||||
// (given most other games would probably prefer them as static) hence we need to make them dynamic.
|
||||
physics1.BodyType = BodyType.Dynamic;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Robust.UnitTesting.Shared.Map
|
||||
grid.SetTile(new Vector2i(-1, -2), new Tile(1));
|
||||
grid.SetTile(new Vector2i(1, 2), new Tile(1));
|
||||
|
||||
var bounds = grid.WorldBounds;
|
||||
var bounds = grid.WorldAABB;
|
||||
|
||||
// this is world, so add the grid world pos
|
||||
Assert.That(bounds.Bottom, Is.EqualTo(-2+5));
|
||||
@@ -82,7 +82,7 @@ namespace Robust.UnitTesting.Shared.Map
|
||||
|
||||
grid.SetTile(new Vector2i(1, 2), Tile.Empty);
|
||||
|
||||
var bounds = grid.WorldBounds;
|
||||
var bounds = grid.WorldAABB;
|
||||
|
||||
// this is world, so add the grid world pos
|
||||
Assert.That(bounds.Bottom, Is.EqualTo(-2+5));
|
||||
|
||||
Reference in New Issue
Block a user