From 7785513e8bfe4ff6ee3c97ed329b94a600621806 Mon Sep 17 00:00:00 2001 From: Alula <6276139+alula@users.noreply.github.com> Date: Fri, 8 Mar 2024 01:44:30 +0100 Subject: [PATCH] Fix inaccuracy: bloody water droplets --- src/common.rs | 2 +- src/game/physics.rs | 1 + src/game/player/mod.rs | 2 +- src/scene/game_scene.rs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/common.rs b/src/common.rs index ccc20d9..7c8d88e 100644 --- a/src/common.rs +++ b/src/common.rs @@ -47,7 +47,7 @@ bitfield! { pub in_water, set_in_water: 8; pub weapon_hit_block, set_weapon_hit_block: 9; // 0x200 pub hit_by_spike, set_hit_by_spike: 10; // 0x400 - pub water_splash_facing_right, set_water_splash_facing_right: 11; // 0x800 + pub bloody_droplets, set_bloody_droplets: 11; // 0x800 pub force_left, set_force_left: 12; // 0x1000 pub force_up, set_force_up: 13; // 0x2000 pub force_right, set_force_right: 14; // 0x4000 diff --git a/src/game/physics.rs b/src/game/physics.rs index 0c12fb7..f96450c 100644 --- a/src/game/physics.rs +++ b/src/game/physics.rs @@ -708,6 +708,7 @@ pub trait PhysicalEntity { self.flags().set_hit_by_spike(true); if water { self.flags().set_in_water(true); + self.flags().set_bloody_droplets(true); } } } diff --git a/src/game/player/mod.rs b/src/game/player/mod.rs index 0827eeb..2e14649 100644 --- a/src/game/player/mod.rs +++ b/src/game/player/mod.rs @@ -559,7 +559,7 @@ impl Player { droplet.cond.set_alive(true); droplet.y = self.y; droplet.direction = - if self.flags.water_splash_facing_right() { Direction::Right } else { Direction::Left }; + if self.flags.bloody_droplets() { Direction::Right } else { Direction::Left }; for _ in 0..7 { droplet.x = self.x + (state.game_rng.range(-8..8) * 0x200) as i32; diff --git a/src/scene/game_scene.rs b/src/scene/game_scene.rs index c37dbd0..6b65fc8 100644 --- a/src/scene/game_scene.rs +++ b/src/scene/game_scene.rs @@ -1121,7 +1121,7 @@ impl GameScene { droplet.cond.set_alive(true); droplet.y = npc.y; droplet.direction = - if npc.flags.water_splash_facing_right() { Direction::Right } else { Direction::Left }; + if npc.flags.bloody_droplets() { Direction::Right } else { Direction::Left }; for _ in 0..7 { droplet.x = npc.x + (npc.rng.range(-8..8) * 0x200) as i32;