Skip to content

Commit

Permalink
Tweak mob spawning positions
Browse files Browse the repository at this point in the history
  • Loading branch information
Enet4 committed Nov 27, 2024
1 parent 453f9a9 commit 35ef231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/live/mob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub fn spawn_mobs(
println!("Spawning mob");
// spawn a mob
// use an RNG to pseudorandomize the position
let rel_x = (random.rng.next_range(0..12_u32) as f32 - 6.) / 2.;
let rel_x = (random.rng.next_range(0..14_u32) as f32 - 7.) / 2.;
let rel_y = random.rng.next_range(0..5_u32) as f32 - 2.5;
let rel_z = if spawner.count % 2 == 0 {
MOB_SPAWN_Z_OFFSET + (spawner.count / 2) as f32 * 0.2
Expand Down

0 comments on commit 35ef231

Please sign in to comment.