Compare commits

...
2 Commits
Author SHA1 Message Date
EIREXE c0c88d5dbd Kill warnings
CI / production-build (pull_request) Successful in 15m36s
CI / build-and-test (pull_request) Successful in 7m46s
2026-09-27 21:31:21 +02:00
EIREXE a83caf9153 Fix airdodge duration & tests 2026-09-27 21:30:44 +02:00
5 changed files with 5 additions and 22 deletions
+2
View File
@@ -168,6 +168,8 @@ mod tests {
air_dodge_duration: 0, air_dodge_duration: 0,
air_dodge_velocity: FGi32::ZERO, air_dodge_velocity: FGi32::ZERO,
air_dodge_decay: FGi32::ZERO, air_dodge_decay: FGi32::ZERO,
air_dodge_intangible_duration: 29,
air_dodge_intangible_start: 4,
} }
} }
+1 -1
View File
@@ -32,7 +32,7 @@ impl FighterStateImpl for AirDodgeState {
let airdodge_intangible_end = state_context.fighter_attributes.air_dodge_intangible_start + state_context.fighter_attributes.air_dodge_intangible_duration; let airdodge_intangible_end = state_context.fighter_attributes.air_dodge_intangible_start + state_context.fighter_attributes.air_dodge_intangible_duration;
if state_context.animation_frame == state_context.fighter_attributes.air_dodge_intangible_start { if state_context.animation_frame == state_context.fighter_attributes.air_dodge_intangible_start {
*state_context.vulnerability = FighterInvulnerabilityState::Intangible; *state_context.vulnerability = FighterInvulnerabilityState::Intangible;
} else if state_context.animation_frame > airdodge_intangible_end { } else if state_context.animation_frame >= airdodge_intangible_end {
*state_context.vulnerability = FighterInvulnerabilityState::Vulnerable; *state_context.vulnerability = FighterInvulnerabilityState::Vulnerable;
} }
state_context.velocity.0 *= state_context.fighter_attributes.air_dodge_decay; state_context.velocity.0 *= state_context.fighter_attributes.air_dodge_decay;
+1 -1
View File
@@ -16,7 +16,7 @@ use crate::{
manifest::{FighterManifest, FighterManifestRegistry}, manifest::{FighterManifest, FighterManifestRegistry},
spawn_fighter, spawn_fighter,
visual::FighterAnimations, visual::FighterAnimations,
}, input::{LocalInputAssignments, LocalInputSource, MatchInputAssignments}, match_runtime::MatchState, materials::fighter_material::FighterMaterial, netcode::{ }, input::{LocalInputAssignments, LocalInputSource, MatchInputAssignments}, match_runtime::MatchState, netcode::{
GGRSCfg, GGRSCfg,
session::{ConnectionStatus, SessionConfig, create_session}, session::{ConnectionStatus, SessionConfig, create_session},
}, scripting::FighterAttackScript, stage::{ }, scripting::FighterAttackScript, stage::{
-11
View File
@@ -13,17 +13,6 @@ pub struct FighterMaterialExtension {
status_color: LinearRgba, status_color: LinearRgba,
#[uniform(100)] #[uniform(100)]
status_color_intensity: f32, status_color_intensity: f32,
// Web examples WebGL2 support: structs must be 16 byte aligned.
#[cfg(feature = "webgl2")]
#[uniform(100)]
_webgl2_padding_8b: u32,
#[cfg(feature = "webgl2")]
#[uniform(100)]
_webgl2_padding_12b: u32,
#[cfg(feature = "webgl2")]
#[uniform(100)]
_webgl2_padding_16b: u32,
} }
const SHADER_ASSET_PATH: &str = "embedded://shinespark/shaders/fighter.wgsl"; const SHADER_ASSET_PATH: &str = "embedded://shinespark/shaders/fighter.wgsl";
+1 -9
View File
@@ -1,16 +1,8 @@
use bevy::{ use bevy::{
asset::embedded_asset, gltf::GltfMaterialName, material::OpaqueRendererMethod, pbr::ExtendedMaterial, prelude::*, world_serialization::WorldInstanceReady, asset::embedded_asset, prelude::*,
}; };
use bevy::{
color::palettes::basic::RED,
pbr::{MaterialExtension},
prelude::*,
render::render_resource::*,
shader::ShaderRef,
};
use crate::materials::fighter_material::{FighterMaterial, FighterMaterialExtension};
pub mod fighter_material; pub mod fighter_material;