ecs: fix tuple query item skipping
This commit is contained in:
		
							parent
							
								
									fbcf3f89d0
								
							
						
					
					
						commit
						bf164a5936
					
				@ -650,7 +650,9 @@ macro_rules! tuple_impl {
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            unsafe fn should_skip(&self) -> bool {
 | 
			
		||||
                false
 | 
			
		||||
                #[allow(non_snake_case)]
 | 
			
		||||
                let ($($name,)*) = self;
 | 
			
		||||
                $($name.should_skip()||)* false
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -213,5 +213,12 @@ mod tests {
 | 
			
		||||
            .iter()
 | 
			
		||||
            .collect::<Vec<Entity>>();
 | 
			
		||||
        assert_eq!(a_b_changed, vec![e2]);
 | 
			
		||||
 | 
			
		||||
        let a_b_changed_tuple = world
 | 
			
		||||
            .query::<(Changed<A, Entity>, Changed<B, &B>)>()
 | 
			
		||||
            .iter()
 | 
			
		||||
            .map(|(e, _b)| e)
 | 
			
		||||
            .collect::<Vec<Entity>>();
 | 
			
		||||
        assert_eq!(a_b_changed_tuple, vec![e2]);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user