Fix compilation warnings
This commit is contained in:
@@ -63,8 +63,4 @@ impl FighterAttributes {
|
|||||||
|
|
||||||
(accel, target_vel)
|
(accel, target_vel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct FighterAttributesLink {
|
|
||||||
attributes: Handle<FighterAttributes>,
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
//! Resolving an integrated fighter position against the stage.
|
//! Resolving an integrated fighter position against the stage.
|
||||||
|
|
||||||
use bevy::prelude::*;
|
|
||||||
|
|
||||||
use crate::fighter::state::FighterStateContext;
|
use crate::fighter::state::FighterStateContext;
|
||||||
use crate::math::segment::FGSegment2d;
|
use crate::math::segment::FGSegment2d;
|
||||||
use crate::math::vec::FGVec2;
|
use crate::math::vec::FGVec2;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use fixed::traits::Fixed;
|
|
||||||
|
|
||||||
use crate::math::{int::FGi32, vec::FGVec2};
|
use crate::math::{int::FGi32, vec::FGVec2};
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -98,7 +98,6 @@ pub struct FighterVisual;
|
|||||||
|
|
||||||
#[derive(Component)]
|
#[derive(Component)]
|
||||||
pub struct Fighter {
|
pub struct Fighter {
|
||||||
id: FighterId,
|
|
||||||
pub manifest: Handle<FighterManifest>,
|
pub manifest: Handle<FighterManifest>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,8 +169,7 @@ pub fn spawn_fighter(
|
|||||||
commands: &mut Commands,
|
commands: &mut Commands,
|
||||||
player_handle: usize,
|
player_handle: usize,
|
||||||
spawn_position: FGVec2,
|
spawn_position: FGVec2,
|
||||||
manifest: (Handle<FighterManifest>, &FighterManifest),
|
manifest: Handle<FighterManifest>,
|
||||||
_attributes: FighterAttributes,
|
|
||||||
animations: FighterAnimations,
|
animations: FighterAnimations,
|
||||||
visual_root: WorldAssetRoot,
|
visual_root: WorldAssetRoot,
|
||||||
) {
|
) {
|
||||||
@@ -181,8 +179,7 @@ pub fn spawn_fighter(
|
|||||||
handle: player_handle,
|
handle: player_handle,
|
||||||
},
|
},
|
||||||
Fighter {
|
Fighter {
|
||||||
id: manifest.1.id,
|
manifest: manifest,
|
||||||
manifest: manifest.0,
|
|
||||||
},
|
},
|
||||||
FighterFacingDirection::Right,
|
FighterFacingDirection::Right,
|
||||||
FighterECB {
|
FighterECB {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
use fixed::traits::Fixed;
|
|
||||||
|
|
||||||
use crate::fighter::*;
|
use crate::fighter::*;
|
||||||
|
|
||||||
pub fn integrate_gravity(velocity: &mut FighterVelocity, attributes: &FighterAttributes) {
|
pub fn integrate_gravity(velocity: &mut FighterVelocity, attributes: &FighterAttributes) {
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hasher};
|
||||||
|
|
||||||
use bevy::prelude::*;
|
|
||||||
|
|
||||||
use super::{FighterStateContext, FighterStateImpl, ground, run, wait, walk};
|
use super::{FighterStateContext, FighterStateImpl, ground, run, wait, walk};
|
||||||
use crate::fighter::FighterFacingDirection;
|
use crate::fighter::FighterFacingDirection;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ use crate::math::vec::FGVec2;
|
|||||||
use crate::stage::line::{StageLineID, StagePolyLineSegmentType};
|
use crate::stage::line::{StageLineID, StagePolyLineSegmentType};
|
||||||
|
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use fixed::traits::Fixed;
|
|
||||||
|
|
||||||
#[derive(Reflect, Hash, Clone, Debug)]
|
#[derive(Reflect, Hash, Clone, Debug)]
|
||||||
pub struct GroundedStateCommon {
|
pub struct GroundedStateCommon {
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
use bevy::prelude::*;
|
|
||||||
|
|
||||||
use crate::fighter::{
|
use crate::fighter::{
|
||||||
animation::AnimKind,
|
animation::AnimKind,
|
||||||
state::{
|
state::{
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
|
|
||||||
use bevy::prelude::*;
|
|
||||||
|
|
||||||
use super::{FighterStateContext, FighterStateImpl, dash, ground, wait};
|
use super::{FighterStateContext, FighterStateImpl, dash, ground, wait};
|
||||||
use crate::fighter::animation::AnimKind;
|
use crate::fighter::animation::AnimKind;
|
||||||
use crate::fighter::state::FighterState;
|
use crate::fighter::state::FighterState;
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
use bevy::math::Vec2;
|
use bevy::math::Vec2;
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use fixed::traits::Fixed;
|
|
||||||
|
|
||||||
use crate::game_settings::GameSettings;
|
|
||||||
use crate::input::map::GamepadBinding;
|
use crate::input::map::GamepadBinding;
|
||||||
use crate::input::{BaseInputMap, FighterInputFrame, InputMapAction};
|
use crate::input::{BaseInputMap, FighterInputFrame, InputMapAction};
|
||||||
use crate::math::int::FGi32;
|
use crate::math::int::FGi32;
|
||||||
use crate::math::vec::FGVec2;
|
use crate::math::vec::FGVec2;
|
||||||
|
|
||||||
pub fn sample_gamepad(pad: &Gamepad, input_map: &BaseInputMap, _game_settings: &GameSettings) -> FighterInputFrame {
|
pub fn sample_gamepad(pad: &Gamepad, input_map: &BaseInputMap) -> FighterInputFrame {
|
||||||
let mut input_frame = FighterInputFrame::default();
|
let mut input_frame = FighterInputFrame::default();
|
||||||
let mut movement = Vec2::ZERO;
|
let mut movement = Vec2::ZERO;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -134,7 +134,7 @@ fn read_local_inputs(
|
|||||||
.and_then(|entity| gamepads.get(entity).ok());
|
.and_then(|entity| gamepads.get(entity).ok());
|
||||||
|
|
||||||
let mut input_frame = match gamepad {
|
let mut input_frame = match gamepad {
|
||||||
Some(pad) => gamepad::sample_gamepad(pad, &input_map, &game_settings),
|
Some(pad) => gamepad::sample_gamepad(pad, &input_map),
|
||||||
None => keyboard::sample_keyboard(&key, &input_map),
|
None => keyboard::sample_keyboard(&key, &input_map),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -201,9 +201,6 @@ pub fn prepare_match(
|
|||||||
prepared.push((
|
prepared.push((
|
||||||
scene,
|
scene,
|
||||||
animations.clone(),
|
animations.clone(),
|
||||||
manifest.attributes,
|
|
||||||
manifest.camera,
|
|
||||||
manifest,
|
|
||||||
manifest_handle,
|
manifest_handle,
|
||||||
));
|
));
|
||||||
continue;
|
continue;
|
||||||
@@ -250,9 +247,6 @@ pub fn prepare_match(
|
|||||||
prepared.push((
|
prepared.push((
|
||||||
scene,
|
scene,
|
||||||
animations,
|
animations,
|
||||||
manifest.attributes,
|
|
||||||
manifest.camera,
|
|
||||||
manifest,
|
|
||||||
manifest_handle,
|
manifest_handle,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -286,7 +280,7 @@ pub fn prepare_match(
|
|||||||
|
|
||||||
for (
|
for (
|
||||||
index,
|
index,
|
||||||
(player, (scene, animations, attributes, _camera_profile, manifest, manifest_handle)),
|
(player, (scene, animations, manifest_handle)),
|
||||||
) in request.players.iter().zip(prepared).enumerate()
|
) in request.players.iter().zip(prepared).enumerate()
|
||||||
{
|
{
|
||||||
let spawn_x = (index as i32 * 2 + 1 - request.players.len() as i32) * 5;
|
let spawn_x = (index as i32 * 2 + 1 - request.players.len() as i32) * 5;
|
||||||
@@ -294,8 +288,7 @@ pub fn prepare_match(
|
|||||||
&mut commands,
|
&mut commands,
|
||||||
player.handle,
|
player.handle,
|
||||||
FGVec2::new(FGi32::from_num(spawn_x), FGi32::lit("12.5")),
|
FGVec2::new(FGi32::from_num(spawn_x), FGi32::lit("12.5")),
|
||||||
(manifest_handle.clone(), manifest),
|
manifest_handle.clone(),
|
||||||
attributes,
|
|
||||||
animations,
|
animations,
|
||||||
WorldAssetRoot(scene),
|
WorldAssetRoot(scene),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
use bevy::prelude::*;
|
use bevy::prelude::*;
|
||||||
use fixed::prelude::*;
|
|
||||||
|
|
||||||
use crate::math::{
|
use crate::math::{
|
||||||
int::{FGWide, FGi32},
|
int::{FGWide, FGi32},
|
||||||
|
|||||||
Reference in New Issue
Block a user