Initial work on rollback and refactor

This commit is contained in:
2026-08-12 12:27:35 +02:00
parent ad6c1e17ac
commit a21f24b2d9
45 changed files with 1451 additions and 717 deletions
+14
View File
@@ -0,0 +1,14 @@
use bevy::prelude::*;
use bevy_ggrs::prelude::*;
// #[require(Rollback)] is the idiomatic way to ensure an entity is always included in
// the rollback system. Whenever a Player is spawned, Rollback (and its RollbackId) will
// be added automatically — no need to add it manually in the spawn bundle.
/// Ties an entity to one of the session's input streams. Lives at the crate
/// root rather than in `netcode` because "which player is this" is a game
/// concept; `netcode` only decides where the inputs come from.
#[derive(Default, Component)]
#[require(Rollback)]
pub struct Player {
pub handle: usize,
}