Comments (2)
I think the issue is due to that we don't restore the Rollback
component itself. I tried restoring it like this:
diff --git a/src/snapshot/entity.rs b/src/snapshot/entity.rs
index 5da10d0..2492427 100644
--- a/src/snapshot/entity.rs
+++ b/src/snapshot/entity.rs
@@ -72,6 +72,9 @@ impl EntitySnapshotPlugin {
}
(None, Some(old_entity)) => {
let current_entity = commands.spawn_empty().id();
+ commands
+ .entity(current_entity)
+ .insert(Rollback::new(*old_entity));
entity_map.insert(*old_entity, current_entity);
}
(None, None) => unreachable!(
Which delays the desync until frame 3, the entity is properly restored, once, but not the next time.
from bevy_ggrs.
Oh, old_entity is the actual entity it points to, which changes each time it's restored. We already have the original Rollback
component here, it's the key :) See proper fix in linked pr above :)
from bevy_ggrs.
Related Issues (20)
- [Question] How to sync elapsed time since startup among peers? HOT 4
- 3d example, and other questions HOT 4
- Update entity IDs in Children/Parent components on rollback. HOT 2
- Update to Bevy 0.13
- Document idiomatic way to sort rollback related queries
- Synctest session doesn't detect all desyncs that it could/should
- Adding players after p2p session already started HOT 3
- Support synchronizing parts of world state, since Rust isn't deterministic. HOT 15
- Potential Scalability Refactor HOT 6
- Sessions `.with_desync_detection(DesyncDetection::On)` always reports false positives HOT 1
- Integration Tests incorrect HOT 2
- More idiomatic component/resource checksums for float types?
- Adding non-rollbacked children to rollbacked entities break the hierarchy HOT 1
- Desync detection appears to compare the checksum of predicted frames to confirmed frames HOT 8
- Sprite Component doesn't get respawned after rollback HOT 5
- panic: `Rollback requested was not created using AddRollbackCommand!`
- When rollbacks happen across entity spawning, desyncs are reported HOT 1
- Convenient way to end a session HOT 5
- Checksums are not portable HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bevy_ggrs.