diff options
Diffstat (limited to 'src/sim')
| -rw-r--r-- | src/sim/lib/force.rs | 1 | ||||
| -rw-r--r-- | src/sim/sim_manager/utils.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/sim/lib/force.rs b/src/sim/lib/force.rs index c6cfaf0..d461589 100644 --- a/src/sim/lib/force.rs +++ b/src/sim/lib/force.rs @@ -98,6 +98,7 @@ pub fn apply_explosion( } // TODO profile packing entity ID into cells? +// TODO sink power in a radius around the impact // might improve performance by a lot if we don't have to raycast for hit entities pub fn apply_bullet(ctx: &mut SimCtx, from: Vec2, to: Vec2, power: u32) { let dda = AwDda::new(from, to); diff --git a/src/sim/sim_manager/utils.rs b/src/sim/sim_manager/utils.rs index 38f503a..75ef71d 100644 --- a/src/sim/sim_manager/utils.rs +++ b/src/sim/sim_manager/utils.rs @@ -145,7 +145,7 @@ pub fn read_back_entities_from_world( // first check if the entity has been partitioned let components = compute_components(&ec.cells, ec.size.x, ec.size.y); if components.len() == 0 { - panic!("The entity was completely destroyed?") + sim.destroy_entity(entity_id); } else if components.len() == 1 { // the entity's cells were changed, but not partitioned puffin::profile_scope!("Recompute collider"); |
