summaryrefslogtreecommitdiff
path: root/src/content/entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/entities')
-rw-r--r--src/content/entities/entity_cube.rs2
-rw-r--r--src/content/entities/entity_grenade.rs9
2 files changed, 3 insertions, 8 deletions
diff --git a/src/content/entities/entity_cube.rs b/src/content/entities/entity_cube.rs
index ab93e5e..fb5bbd0 100644
--- a/src/content/entities/entity_cube.rs
+++ b/src/content/entities/entity_cube.rs
@@ -17,7 +17,7 @@ pub fn entity_cube_def(position: Vec2, material: MaterialId) -> EntityDef {
for y in 0..h {
let cell_idx = x + y * w;
raw_cells[cell_idx as usize] = Cell::from_material(material);
- raw_cells[cell_idx as usize].set_entity(true);
+ raw_cells[cell_idx as usize].set_entity_integrated(true);
}
}
diff --git a/src/content/entities/entity_grenade.rs b/src/content/entities/entity_grenade.rs
index c13c239..f6c82e8 100644
--- a/src/content/entities/entity_grenade.rs
+++ b/src/content/entities/entity_grenade.rs
@@ -15,12 +15,7 @@ struct GrenadeEntityBehaviour {
}
impl EntityBehaviour for GrenadeEntityBehaviour {
- fn update(
- &mut self,
- update_ctx: &mut EntityUpdateCtx,
- ctx: &mut SimCtx,
- delta_time: f32,
- ) {
+ fn update(&mut self, update_ctx: &mut EntityUpdateCtx, ctx: &mut SimCtx, delta_time: f32) {
self.fuse -= delta_time;
if self.fuse <= 0.0 {
apply_explosion(
@@ -44,7 +39,7 @@ pub fn entity_grenade_def(position: Vec2, fuse: f32) -> EntityDef {
for y in 0..h {
let cell_idx = x + y * w;
raw_cells[cell_idx as usize] = Cell::from_material(MaterialId::Steel);
- raw_cells[cell_idx as usize].set_entity(true);
+ raw_cells[cell_idx as usize].set_entity_integrated(true);
}
}