From 1a7a5e60240ebcd61788577164847ea85d9b793b Mon Sep 17 00:00:00 2001 From: Franklin Blanco Date: Thu, 23 Nov 2023 10:18:54 -0800 Subject: [PATCH] finished test here --- src/logic/core/guns/shoot.rs | 5 ++++- src/logic/core/player/hands.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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;