view_hand being sent and panicking causes logged_out or something else to fail?
This commit is contained in:
parent
baab16144b
commit
c68af245af
3 changed files with 6 additions and 4 deletions
|
|
@ -226,12 +226,13 @@ fn on_player_insert_update(
|
|||
mut commands: Commands,
|
||||
|
||||
main_player: Option<Single<&MainPlayer>>,
|
||||
other_players: Query<&Player>,
|
||||
other_players: Query<&Player, Without<MainPlayer>>,
|
||||
|
||||
mut next_turnstate: ResMut<NextState<jong_types::states::TurnState>>,
|
||||
) {
|
||||
for msg in messages.read() {
|
||||
debug!("on_player_insert_update: {:?}", msg.new);
|
||||
assert_eq!(msg.new.identity, stdb.identity());
|
||||
if main_player.is_none() && msg.new.identity == stdb.identity() {
|
||||
// trace!("spawn_main_player");
|
||||
spawn_main_player(&stdb, &mut commands, &mut next_turnstate, &msg.new);
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ pub(crate) fn render_main_hand(
|
|||
let hand: Vec<_> = hand
|
||||
.iter()
|
||||
.find_map(|(c, e)| {
|
||||
debug!("main_player children: {:?}", *main_player);
|
||||
// debug!("main_player children: {:?}", *main_player);
|
||||
if main_player.contains(&e) {
|
||||
Some(c)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue