]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/infomessages.qc
Merge branch 'Mario/showspecs' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / infomessages.qc
index 39c5bc64392526f637f2a3fd38c6c586b5b78bca..1839263a4563b7f1cd7a73bc3f2db8abad12c15e 100644 (file)
@@ -195,6 +195,24 @@ void HUD_InfoMessages()
                                }
                        }
                }
+
+               if(autocvar_cl_showspectators)
+               if(num_spectators)
+               //if(spectatee_status != -1)
+               {
+                       s = ((spectatee_status) ? _("^1Spectating this player:") : _("^1Spectating you:"));
+                       //drawInfoMessage(s)
+                       int limit = min(num_spectators, MAX_SPECTATORS);
+                       for(int i = 0; i < limit; ++i)
+                       {
+                               float slot = spectatorlist[i];
+                               if(i == 0)
+                                       s = strcat(s, " ^7", entcs_GetName(slot));
+                               else
+                                       s = strcat("^7", entcs_GetName(slot));
+                               drawInfoMessage(s);
+                       }
+               }
        }
        else
        {