Remove transform methods from mapgrid (#12233)

This commit is contained in:
metalgearsloth
2022-11-01 11:27:18 +11:00
committed by GitHub
parent 297686c4ff
commit c9a2ab1cee
25 changed files with 144 additions and 78 deletions

View File

@@ -149,9 +149,11 @@ public sealed class PiratesRuleSystem : GameRuleSystem
}
var map = "/Maps/pirate.yml";
var xformQuery = GetEntityQuery<TransformComponent>();
var aabbs = _stationSystem.Stations.SelectMany(x =>
Comp<StationDataComponent>(x).Grids.Select(x => _mapManager.GetGridComp(x).Grid.WorldAABB)).ToArray();
Comp<StationDataComponent>(x).Grids.Select(x => xformQuery.GetComponent(x).WorldMatrix.TransformBox(_mapManager.GetGridComp(x).Grid.LocalAABB))).ToArray();
var aabb = aabbs[0];
for (var i = 1; i < aabbs.Length; i++)