Fixed 0th index having pipes after rewinding to that spot

main
Elijah Voigt 3 months ago
parent 49b95ab5f9
commit 76aeb8dcaf

@ -850,11 +850,15 @@ fn manage_batches(
PlayerState::Rewind => (curr.saturating_add(2), curr.saturating_sub(2)),
_ => (*curr, *curr),
};
if target_batch_id == 0 || new_batch_id == 0 {
// skip
} else {
if target_batch_id != new_batch_id {
if let Some(e_old) = batches.iter().find_map(|(e, b)| (b.0 == target_batch_id).then_some(e)) {
commands.entity(e_old).insert(Batch(new_batch_id));
}
}
}
};
});
}

Loading…
Cancel
Save