From 868668ab43a3639b3bb6d2cb7739e61491377fff Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 2 Apr 2024 07:22:40 +0200 Subject: [PATCH] remove debug code --- src/world.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/world.rs b/src/world.rs index 9cd2b31..0ed1588 100644 --- a/src/world.rs +++ b/src/world.rs @@ -1,4 +1,4 @@ -use crate::{actor, nature, settings, hud}; +use crate::{actor, nature, settings}; use bevy::prelude::*; use bevy::render::render_resource::{AsBindGroup, ShaderRef}; use bevy::math::{DVec3, I64Vec3}; @@ -184,7 +184,6 @@ fn spawn_despawn_asteroids( asset_server: Res, mut q_asteroid: Query<(Entity, &mut Visibility), With>, mut last_player_cell: Local, - mut log: ResMut, ) { if !timer.0.tick(time.delta()).just_finished() || q_player.is_empty() { //if q_player.is_empty() { @@ -201,10 +200,6 @@ fn spawn_despawn_asteroids( } *last_player_cell = player_cell; - let mut spawned = 0; - let mut spawned_near = 0; - let mut despawned = 0; - // Parameters let view_radius: f64 = ASTEROID_VIEW_RADIUS; let step: f64 = ASTEROID_SPAWN_STEP; @@ -230,7 +225,6 @@ fn spawn_despawn_asteroids( entity: asteroid.entity, origin: origin.clone(), }); - despawned += 1; despawning_worked = true; break; } @@ -290,8 +284,6 @@ fn spawn_despawn_asteroids( if dist > 6.0 { continue; } - dbg!(size_density, dist); - spawned_near += 1; } let size: f32 = ASTEROID_SIZE_FACTOR * size_density; @@ -336,13 +328,9 @@ fn spawn_despawn_asteroids( entity: entity_commands.id(), //viewdistance: 99999999.0, }); - spawned += 1; } } } - if spawned != 0 || despawned != 0 { - //log.notice(format!("spawned: {spawned} (near: {spawned_near}), despawned: {despawned}")); - } } fn handle_despawn(