diff --git a/src/logic/core/guns/shoot.rs b/src/logic/core/guns/shoot.rs index 96db312..4cef11d 100644 --- a/src/logic/core/guns/shoot.rs +++ b/src/logic/core/guns/shoot.rs @@ -3,7 +3,8 @@ use std::time::Duration; use bevy::{prelude::*, render::render_resource::PrimitiveTopology}; use bevy_rapier3d::prelude::*; -use crate::comps::core::{markers::{bullet::BulletMarker, muzzle_flash::MuzzleFlashMarker}, weapons::caliber::Caliber}; +use crate::{comps::core::{markers::{bullet::BulletMarker, muzzle_flash::MuzzleFlashMarker}, weapons::caliber::Caliber}, logic::core::player::player_settings::PlayerSettings}; + pub fn shoot_bullet( commands: &mut Commands, @@ -13,6 +14,7 @@ pub fn shoot_bullet( forward: Vec3, up: Vec3, caliber: Caliber, + player_settings: &Res ) { // Spawn muzzle flash LIGHT commands.spawn(( @@ -37,6 +39,7 @@ pub fn shoot_bullet( MuzzleFlashMarker(Timer::new(Duration::from_millis(10), TimerMode::Once)), )); // Spawn Line + commands.spawn( MaterialMeshBundle { mesh: { diff --git a/src/logic/core/player/hands.rs b/src/logic/core/player/hands.rs index 657a997..2894b58 100644 --- a/src/logic/core/player/hands.rs +++ b/src/logic/core/player/hands.rs @@ -224,6 +224,7 @@ pub fn capture_hand_usage( forward, up, firearm_data.caliber.clone(), + &resources.player_settings ); // Increment indexes and timers player_firing_info.current_round_index += 1;