diff --git a/src/bullet.rs b/src/bullet.rs index 0b047f3..88525f0 100644 --- a/src/bullet.rs +++ b/src/bullet.rs @@ -25,6 +25,11 @@ impl BulletManager { pub fn tick_bullets(&mut self, state: &mut SharedGameState, player: &dyn PhysicalEntity, stage: &mut Stage) { for bullet in self.bullets.iter_mut() { + if bullet.life < 1 { + bullet.cond.set_alive(false); + continue; + } + bullet.tick(state, player); bullet.hit_flags.0 = 0; bullet.tick_map_collisions(state, stage); diff --git a/src/scene/game_scene.rs b/src/scene/game_scene.rs index 26f3f6a..185da65 100644 --- a/src/scene/game_scene.rs +++ b/src/scene/game_scene.rs @@ -637,7 +637,9 @@ impl GameScene { // todo show damage } } - } else if !bullet.flags.hit_right_slope() { + } else if !bullet.flags.hit_right_slope() + && bullet.btype != 13 && bullet.btype != 14 && bullet.btype != 15 + && bullet.btype != 28 && bullet.btype != 29 && bullet.btype != 30 { state.create_caret((bullet.x + npc.x) / 2, (bullet.y + npc.y) / 2, CaretType::ProjectileDissipation, Direction::Right); // todo play sound 31 bullet.life = 0;