Fix Relation::from_bits

main
copygirl 1 month ago
parent 0cd79755d0
commit 64f6b7467e
  1. 6
      src/ecs/relation.rs

@ -78,9 +78,13 @@ impl Relation {
#[inline]
#[must_use]
pub fn from_bits(bits: u64) -> Option<Self> {
let kind = (bits >> 32) as u32;
let target = bits as u32;
let high = (bits >> 32) as u32;
if let (kind, Flags::RELATION) = Flags::unpack(high)? {
Self::new_checked(kind, target)
} else {
None
}
}
#[inline]

Loading…
Cancel
Save