Pārlūkot izejas kodu

Spectator nick parsing fixed.

Mihawk 12 gadi atpakaļ
vecāks
revīzija
a90e7872da
1 mainītis faili ar 9 papildinājumiem un 2 dzēšanām
  1. 9 2
      Client.cpp

+ 9 - 2
Client.cpp

@@ -110,10 +110,17 @@ void Client::parsePrintedLine()
   {
     playerName = player.name.toAscii();
     QWClient::stripColor(playerName.data());
-    if(printLine.startsWith(playerName))
+    if(printLine.startsWith(playerName) || (player.spectator && printLine.startsWith(QString("[SPEC] " + player.name).toAscii())))
     {
-      if(lastMatchSize < playerName.size())
+      if(player.spectator && printLine.startsWith("[SPEC] "))
+      {
+        if(lastMatchSize < (playerName.size() + 7))
+          lastMatchSize = (playerName.size() + 7);
+      }
+      else if(lastMatchSize < playerName.size())
+      {
         lastMatchSize = playerName.size();
+      }
       parsed = true;
     }
   }