mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-07-13 00:06:01 +00:00
Fix innacuracy [ci skip]
This commit is contained in:
parent
0e164a44df
commit
40767c021b
|
@ -188,7 +188,7 @@ impl NPC {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn tick_n016_save_point(&mut self, state: &mut SharedGameState) -> GameResult {
|
pub(crate) fn tick_n016_save_point(&mut self, state: &mut SharedGameState, npc_list: &NPCList) -> GameResult {
|
||||||
if self.action_num == 0 {
|
if self.action_num == 0 {
|
||||||
self.action_num = 1;
|
self.action_num = 1;
|
||||||
|
|
||||||
|
@ -196,6 +196,11 @@ impl NPC {
|
||||||
self.npc_flags.set_interactable(false);
|
self.npc_flags.set_interactable(false);
|
||||||
self.vel_y = -0x200;
|
self.vel_y = -0x200;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Creates smoke when spawned in a shelter
|
||||||
|
if state.get_flag(523) {
|
||||||
|
npc_list.create_death_smoke(self.x, self.y, self.display_bounds.right as usize, 3, state, &self.rng);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.flags.hit_bottom_wall() {
|
if self.flags.hit_bottom_wall() {
|
||||||
|
@ -214,9 +219,14 @@ impl NPC {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn tick_n017_health_refill(&mut self, state: &mut SharedGameState) -> GameResult {
|
pub(crate) fn tick_n017_health_refill(&mut self, state: &mut SharedGameState, npc_list: &NPCList) -> GameResult {
|
||||||
if self.action_num == 0 {
|
if self.action_num == 0 {
|
||||||
self.action_num = 1;
|
self.action_num = 1;
|
||||||
|
|
||||||
|
//Creates smoke when spawned in a shelter
|
||||||
|
if state.get_flag(523) {
|
||||||
|
npc_list.create_death_smoke(self.x, self.y, self.display_bounds.right as usize, 3, state, &self.rng);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
match self.action_num {
|
match self.action_num {
|
||||||
|
|
|
@ -267,8 +267,8 @@ impl GameEntity<([&mut Player; 2], &NPCList, &mut Stage, &mut BulletManager, &mu
|
||||||
13 => self.tick_n013_forcefield(state),
|
13 => self.tick_n013_forcefield(state),
|
||||||
14 => self.tick_n014_key(state),
|
14 => self.tick_n014_key(state),
|
||||||
15 => self.tick_n015_chest_closed(state, npc_list),
|
15 => self.tick_n015_chest_closed(state, npc_list),
|
||||||
16 => self.tick_n016_save_point(state),
|
16 => self.tick_n016_save_point(state, npc_list),
|
||||||
17 => self.tick_n017_health_refill(state),
|
17 => self.tick_n017_health_refill(state, npc_list),
|
||||||
18 => self.tick_n018_door(state, npc_list),
|
18 => self.tick_n018_door(state, npc_list),
|
||||||
19 => self.tick_n019_balrog_bust_in(state, npc_list),
|
19 => self.tick_n019_balrog_bust_in(state, npc_list),
|
||||||
20 => self.tick_n020_computer(state),
|
20 => self.tick_n020_computer(state),
|
||||||
|
|
Loading…
Reference in a new issue