mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
fix get/set being wrong for chunk changed
This commit is contained in:
parent
74c7300de2
commit
ba2305d331
1 changed files with 2 additions and 2 deletions
|
@ -102,10 +102,10 @@ pub struct Chunk {
|
|||
struct Changed<T: Default>([T; CHUNK_SIZE]);
|
||||
impl Changed<u128> {
|
||||
fn get(&self, n: usize) -> bool {
|
||||
self.0[n / CHUNK_SIZE] & (1 << n) != 0
|
||||
self.0[n / CHUNK_SIZE] & (1 << (n % CHUNK_SIZE)) != 0
|
||||
}
|
||||
fn set(&mut self, n: usize) {
|
||||
self.0[n / CHUNK_SIZE] |= 1 << n
|
||||
self.0[n / CHUNK_SIZE] |= 1 << (n % CHUNK_SIZE)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue