Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge case - Insert in commands, causes rollbacks with pre spawned #934

Open
Sirmadeira opened this issue Feb 28, 2025 · 2 comments
Open

Comments

@Sirmadeira
Copy link
Contributor

Sirmadeira commented Feb 28, 2025

I ran into this very oddly and specific bug on main. Every single example, is afflicted with it

This has rollbacks

PreSpawnedPlayerObject::default_with_salt(player.client_id.to_bits());
        let bullet_entity = commands
            .spawn((
                BulletBundle::new(
                    player.client_id,
                    bullet_origin,
                    bullet_linvel,
                    (color.0.to_linear() * 5.0).into(), // bloom!
                    current_tick,
                ),
                PhysicsBundle::bullet(),
            )).insert(prespawned)
            .id();

This doesnt, that also seems to afflict replicate later insertion replicates.


commands
            .spawn((
                BulletBundle::new(
                    player.client_id,
                    bullet_origin,
                    bullet_linvel,
                    (color.0.to_linear() * 5.0).into(), // bloom!
                    current_tick,
                ),
                PhysicsBundle::bullet(),
                prespawned,
            ))
            .id();
@cBournhonesque
Copy link
Owner

TO make sure I understand, there are no rollbacks when all the components are inserted together?

@Sirmadeira
Copy link
Contributor Author

Yes, that is exactly right. I know it be crazy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants