equal
deleted
inserted
replaced
444 info.teams_in_game -= 1; |
444 info.teams_in_game -= 1; |
445 if info.teams_in_game == 0 { |
445 if info.teams_in_game == 0 { |
446 actions.push(FinishRoomGame(r.id)); |
446 actions.push(FinishRoomGame(r.id)); |
447 } |
447 } |
448 let remove_msg = to_engine_msg(once(b'F').chain(team_name.bytes())); |
448 let remove_msg = to_engine_msg(once(b'F').chain(team_name.bytes())); |
449 match &info.last_msg { |
449 if let Some(m) = &info.sync_msg { |
450 Some(m) => info.msg_log.push(m.clone()), |
450 info.msg_log.push(m.clone()); |
451 None => info.msg_log.push(remove_msg.clone()) |
451 } |
452 } |
452 if info.sync_msg.is_some() { |
|
453 info.sync_msg = None |
|
454 } |
|
455 info.msg_log.push(remove_msg.clone()); |
453 actions.push(ForwardEngineMessage(vec![remove_msg]) |
456 actions.push(ForwardEngineMessage(vec![remove_msg]) |
454 .send_all().in_room(r.id).but_self().action()); |
457 .send_all().in_room(r.id).but_self().action()); |
455 } |
458 } |
456 } |
459 } |
457 server.react(client_id, actions); |
460 server.react(client_id, actions); |