mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2024-09-28 21:19:24 +00:00
Bug Fixes
This commit is contained in:
parent
7dcf30f854
commit
7e793e09a8
|
@ -63,7 +63,7 @@ impl NikumaruCounter {
|
||||||
let mut random_list: [u8; 4] = [0; 4];
|
let mut random_list: [u8; 4] = [0; 4];
|
||||||
|
|
||||||
for iter in 0..=3 {
|
for iter in 0..=3 {
|
||||||
random_list[iter] = state.game_rng.range(0..250) as u8 + iter as u8;
|
random_list[iter] = state.effect_rng.range(0..250) as u8 + iter as u8;
|
||||||
|
|
||||||
ticks[iter] = u32::from_le_bytes([
|
ticks[iter] = u32::from_le_bytes([
|
||||||
ticks[iter].to_le_bytes()[0].wrapping_add(random_list[iter]),
|
ticks[iter].to_le_bytes()[0].wrapping_add(random_list[iter]),
|
||||||
|
|
|
@ -1130,9 +1130,9 @@ impl NPC {
|
||||||
}
|
}
|
||||||
|
|
||||||
if player.x > self.x + 0x28000
|
if player.x > self.x + 0x28000
|
||||||
&& player.x < self.x - 0x28000
|
|| player.x < self.x - 0x28000
|
||||||
&& player.y > self.y + 0x1e000
|
|| player.y > self.y + 0x1e000
|
||||||
&& player.y < self.y - 0x1e000
|
|| player.y < self.y - 0x1e000
|
||||||
{
|
{
|
||||||
self.action_num = 0;
|
self.action_num = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1105,12 +1105,12 @@ impl GameScene {
|
||||||
if npc.flags.water_splash_facing_right() { Direction::Right } else { Direction::Left };
|
if npc.flags.water_splash_facing_right() { Direction::Right } else { Direction::Left };
|
||||||
|
|
||||||
for _ in 0..7 {
|
for _ in 0..7 {
|
||||||
droplet.x = npc.x + (state.game_rng.range(-8..8) * 0x200) as i32;
|
droplet.x = npc.x + (npc.rng.range(-8..8) * 0x200) as i32;
|
||||||
|
|
||||||
droplet.vel_x = npc.vel_x + state.game_rng.range(-0x200..0x200);
|
droplet.vel_x = npc.vel_x + npc.rng.range(-0x200..0x200);
|
||||||
droplet.vel_y = match () {
|
droplet.vel_y = match () {
|
||||||
_ if vertical_splash => state.game_rng.range(-0x200..0x80) - (npc.vel_y / 2),
|
_ if vertical_splash => npc.rng.range(-0x200..0x80) - (npc.vel_y / 2),
|
||||||
_ if horizontal_splash => state.game_rng.range(-0x200..0x80),
|
_ if horizontal_splash => npc.rng.range(-0x200..0x80),
|
||||||
_ => 0,
|
_ => 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1656,6 +1656,8 @@ impl Scene for GameScene {
|
||||||
// I'd personally set it to something higher but left it as is for accuracy.
|
// I'd personally set it to something higher but left it as is for accuracy.
|
||||||
state.water_level = 0x1e0000;
|
state.water_level = 0x1e0000;
|
||||||
|
|
||||||
|
state.carets.clear();
|
||||||
|
|
||||||
self.lighting_mode = match () {
|
self.lighting_mode = match () {
|
||||||
_ if self.intro_mode => LightingMode::None,
|
_ if self.intro_mode => LightingMode::None,
|
||||||
_ if !state.constants.is_switch
|
_ if !state.constants.is_switch
|
||||||
|
|
|
@ -51,6 +51,7 @@ pub struct Settings {
|
||||||
#[serde(default = "default_vsync")]
|
#[serde(default = "default_vsync")]
|
||||||
pub vsync_mode: VSyncMode,
|
pub vsync_mode: VSyncMode,
|
||||||
pub debug_mode: bool,
|
pub debug_mode: bool,
|
||||||
|
#[serde(skip)]
|
||||||
pub noclip: bool,
|
pub noclip: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ impl Bullet {
|
||||||
|
|
||||||
if self.action_num == 0 {
|
if self.action_num == 0 {
|
||||||
self.action_num = 1;
|
self.action_num = 1;
|
||||||
self.anim_num = state.game_rng.range(0..2) as u16;
|
self.anim_num = state.effect_rng.range(0..2) as u16;
|
||||||
|
|
||||||
match self.direction {
|
match self.direction {
|
||||||
Direction::Left => self.vel_x = -0x600,
|
Direction::Left => self.vel_x = -0x600,
|
||||||
|
@ -235,7 +235,7 @@ impl Bullet {
|
||||||
|
|
||||||
if self.action_num == 0 {
|
if self.action_num == 0 {
|
||||||
self.action_num = 1;
|
self.action_num = 1;
|
||||||
self.anim_num = state.game_rng.range(0..2) as u16;
|
self.anim_num = state.effect_rng.range(0..2) as u16;
|
||||||
|
|
||||||
match self.direction {
|
match self.direction {
|
||||||
Direction::Left => {
|
Direction::Left => {
|
||||||
|
@ -1959,8 +1959,8 @@ impl PhysicalEntity for Bullet {
|
||||||
npc.y = (y * 16 + 8) * 0x200;
|
npc.y = (y * 16 + 8) * 0x200;
|
||||||
|
|
||||||
for _ in 0..4 {
|
for _ in 0..4 {
|
||||||
npc.vel_x = state.game_rng.range(-0x200..0x200) as i32;
|
npc.vel_x = npc.rng.range(-0x200..0x200) as i32;
|
||||||
npc.vel_y = state.game_rng.range(-0x200..0x200) as i32;
|
npc.vel_y = npc.rng.range(-0x200..0x200) as i32;
|
||||||
|
|
||||||
let _ = npc_list.spawn(0x100, npc.clone());
|
let _ = npc_list.spawn(0x100, npc.clone());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue