gameServer2/src/server/actions.rs
changeset 13443 2501428303a2
parent 13439 c4f917c6be51
child 13477 f748a72432f2
--- a/gameServer2/src/server/actions.rs	Wed Jul 04 15:42:42 2018 +0300
+++ b/gameServer2/src/server/actions.rs	Wed Jul 04 18:49:51 2018 +0300
@@ -446,10 +446,13 @@
                         actions.push(FinishRoomGame(r.id));
                     }
                     let remove_msg = to_engine_msg(once(b'F').chain(team_name.bytes()));
-                    match &info.last_msg {
-                        Some(m) => info.msg_log.push(m.clone()),
-                        None => info.msg_log.push(remove_msg.clone())
+                    if let Some(m) = &info.sync_msg {
+                        info.msg_log.push(m.clone());
                     }
+                    if info.sync_msg.is_some() {
+                        info.sync_msg = None
+                    }
+                    info.msg_log.push(remove_msg.clone());
                     actions.push(ForwardEngineMessage(vec![remove_msg])
                         .send_all().in_room(r.id).but_self().action());
                 }