Fix various minor issues

This commit is contained in:
2026-09-03 18:50:38 +02:00
parent 472d21fd39
commit 7c7f9a2762
15 changed files with 54 additions and 32 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ pub enum FighterCommands {
/// Frames of life remaining for each buffered command. Indexed by
/// [`FighterCommands`] so adding a command is a two-line change here.
#[derive(Default, Clone, Copy)]
#[derive(Default, Clone, Copy, Hash)]
pub struct FighterCommandLifetimes {
smash_move_left: u8,
smash_move_right: u8,
@@ -60,7 +60,7 @@ impl IndexMut<FighterCommands> for FighterCommandLifetimes {
}
}
#[derive(Component, Default, Clone, Copy)]
#[derive(Component, Default, Clone, Copy, Hash)]
#[require(Rollback)]
pub struct FighterInput {
command_lifetimes: FighterCommandLifetimes,
+1 -1
View File
@@ -4,7 +4,7 @@ use crate::math::vec::FGVec2;
/// One frame of a player's raw input. This is the type GGRS serializes and
/// sends over the wire, so keep it small and keep it `PartialEq`.
#[derive(Copy, Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
#[derive(Copy, Clone, Debug, PartialEq, Default, Serialize, Deserialize, Hash)]
pub struct FighterInputFrame {
pub movement: FGVec2,
pub directional_attack: FGVec2,
+2 -1
View File
@@ -108,7 +108,8 @@ impl Plugin for FighterInputPlugin {
GgrsSchedule,
buffer::postprocess_input.in_set(GameplaySet::Input),
)
.rollback_component_with_clone::<FighterInput>();
.rollback_component_with_clone::<FighterInput>()
.checksum_component_with_hash::<FighterInput>();
}
}