Ver Fonte

Spectator nick parsing fixed.

Mihawk há 12 anos atrás
pai
commit
a90e7872da
1 ficheiros alterados com 9 adições e 2 exclusões
  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;
     }
   }