QTfrontend/game.cpp
changeset 8472 da6b569ac930
parent 8434 4821897a0f10
child 8629 76a265f3967c
--- a/QTfrontend/game.cpp	Tue Feb 05 17:28:12 2013 -0500
+++ b/QTfrontend/game.cpp	Fri Feb 08 15:33:43 2013 +0400
@@ -313,9 +313,8 @@
         default:
         {
             if (gameType == gtNet && !netSuspend)
-            {
-                emit SendNet(msg);
-            }
+                m_netSendBuffer.append(msg);
+
             demo.append(msg);
         }
     }
@@ -344,6 +343,17 @@
         readbuffer.remove(0, msglen + 1);
         ParseMessage(msg);
     }
+    
+    flushNetBuffer();
+}
+
+void HWGame::flushNetBuffer()
+{
+    if(m_netSendBuffer.size())
+    {
+        emit SendNet(m_netSendBuffer);
+        
        m_netSendBuffer.clear();
+    }
 }
 
 QStringList HWGame::getArguments()