]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/Main.qc
Merge branch 'master' into Mario/showspecs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / Main.qc
index a06eb5e6584e3ac96f48c489b762ee748ce9a127..1e320048886f730986b0207da806939cd3bf7277 100644 (file)
@@ -1187,6 +1187,19 @@ void Net_WeaponComplain()
        }
 }
 
+void Net_ReadSpecInfo()
+{
+       float i;
+       
+       num_spectators = ReadByte();
+       for(i = 0; i < num_spectators; ++i)
+       {
+               local float slot = ReadByte();
+               if(i < MAX_SPECTATORS)
+                       spectatorlist[i] = slot - 1;
+       }
+}
+
 // CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
 // You must ALWAYS first acquire the temporary ID, which is sent as a byte.
 // Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
@@ -1248,6 +1261,10 @@ float CSQC_Parse_TempEntity()
                        cl_notice_read();
                        bHandled = true;
                        break;
+               case TE_CSQC_SPECINFO:
+                       Net_ReadSpecInfo();
+                       bHandled = true;
+                       break;
                default:
                        // No special logic for this temporary entity; return 0 so the engine can handle it
                        bHandled = false;