From a1595d841ab05420f1e02bfa37c7da1487c086a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Rom=C3=A1n=20N=C3=BA=C3=B1ez?= Date: Wed, 7 Oct 2026 19:31:01 +0000 Subject: [PATCH] Fix determinism being broken due to bone matrix shenanigans (#87) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.eirexe.moe/EIREXE/shinespark/pulls/87 Co-authored-by: Álex Román Núñez --- src/fighter/baked_animation/runtime.rs | 4 +++- src/fighter/mod.rs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fighter/baked_animation/runtime.rs b/src/fighter/baked_animation/runtime.rs index 1759206..d0fa735 100644 --- a/src/fighter/baked_animation/runtime.rs +++ b/src/fighter/baked_animation/runtime.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use bevy::prelude::*; +use bevy_ggrs::Rollback; use serde::{Deserialize, Serialize}; use super::BAKED_ANIMATION_FPS; @@ -111,7 +112,8 @@ impl BakedFighterAnimations { } } -#[derive(Component, Clone, Debug, Default)] +#[derive(Component, Clone, Debug, Default, Hash)] +#[require(Rollback)] pub struct FighterBoneMatrices { bone_names: Vec, parents: Vec>, diff --git a/src/fighter/mod.rs b/src/fighter/mod.rs index 3747de5..63c817c 100644 --- a/src/fighter/mod.rs +++ b/src/fighter/mod.rs @@ -250,6 +250,8 @@ impl Plugin for FighterPlugin { .checksum_component_with_hash::() .rollback_component_with_copy::() .checksum_component_with_hash::() + .rollback_component_with_clone::() + .checksum_component_with_hash::() // Debug views. .add_systems( FixedPostUpdate,