summaryrefslogtreecommitdiff
path: root/src/sim/cell
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/cell')
-rw-r--r--src/sim/cell/cell.rs17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/sim/cell/cell.rs b/src/sim/cell/cell.rs
index be2cfad..5a9fc1f 100644
--- a/src/sim/cell/cell.rs
+++ b/src/sim/cell/cell.rs
@@ -8,8 +8,11 @@ pub struct Cell {
}
impl Cell {
+ // only update the cell if this matches the parity of the seqno
const FLAG_PARITY: u8 = 0b0000_0001;
- const FLAG_ENTITY: u8 = 0b0000_0010;
+ // is this cell owned by an entity?
+ const FLAG_ENTITY_INTEGRATED: u8 = 0b0000_0010;
+ // how close is the cell to settling?
const MASK_SETTLED: u8 = 0b0001_1100;
#[inline]
@@ -31,15 +34,15 @@ impl Cell {
}
#[inline]
- pub fn entity(self) -> bool {
- (self.flags & Self::FLAG_ENTITY) == Self::FLAG_ENTITY
+ pub fn entity_integrated(self) -> bool {
+ (self.flags & Self::FLAG_ENTITY_INTEGRATED) == Self::FLAG_ENTITY_INTEGRATED
}
#[inline]
- pub fn set_entity(&mut self, rb: bool) {
- if rb {
- self.flags |= Self::FLAG_ENTITY
+ pub fn set_entity_integrated(&mut self, entity_integrated: bool) {
+ if entity_integrated {
+ self.flags |= Self::FLAG_ENTITY_INTEGRATED
} else {
- self.flags &= !Self::FLAG_ENTITY
+ self.flags &= !Self::FLAG_ENTITY_INTEGRATED
}
}