Skip to content

Commit

Permalink
Use Single
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Feb 2, 2025
1 parent acf0727 commit 22cff78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bevy_replicon_example_backend/examples/tic_tac_toe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ fn init_client(
mut commands: Commands,
mut entity_map: ResMut<ClientEntityMap>,
cells: Query<(Entity, &Cell)>,
players: Query<&Symbol, With<Player>>,
server_symbol: Single<&Symbol, With<Player>>,
) {
for (server_entity, cell) in &cells {
let Some(&client_entity) = trigger.event.get(&cell.index) else {
Expand All @@ -344,7 +344,6 @@ fn init_client(
);
}

let server_symbol = players.single();
commands.spawn((Player(trigger.client_id), server_symbol.next()));
commands.set_state(GameState::InGame);
commands.trigger(StartReplication(trigger.client_id));
Expand Down

0 comments on commit 22cff78

Please sign in to comment.