Strip down bundle and correct overly broad query.

This commit is contained in:
Nolan Darilek 2022-05-11 13:34:48 -05:00
parent 0a141f078b
commit e8a15fd84d

View File

@ -134,9 +134,6 @@ pub struct MapBundle<D: 'static + Clone + Default + Send + Sync> {
pub spawn_colliders: SpawnColliders,
pub spawn_collider_per_tile: SpawnColliderPerTile,
pub spawn_portals: SpawnPortals,
pub children: Children,
pub transform: Transform,
pub global_transform: GlobalTransform,
}
pub struct GridBuilder {
@ -419,7 +416,7 @@ fn spawn_portals<D: 'static + Clone + Default + Send + Sync>(
fn spawn_portal_colliders<D: 'static + Clone + Default + Send + Sync>(
mut commands: Commands,
map: Query<(Entity, &SpawnColliders), With<Map<D>>>,
portals: Query<(Entity, &Transform), Without<Collider>>,
portals: Query<(Entity, &Transform), (With<Portal>, Without<Collider>)>,
) {
for (map_entity, spawn_colliders) in map.iter() {
if **spawn_colliders {