]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud.qc
Add an option to show spectators watching you
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index d151a535678400ace2f7465b2a802b3bbdfb3bd6..29c741e3b39be54bc3bc552d74da5c7caa4fe891 100644 (file)
@@ -1416,7 +1416,7 @@ void HUD_HealthArmor(void)
        if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
        {
                vector v;
-               v = healtharmor_maxdamage(health, armor, armorblockpercent);
+               v = healtharmor_maxdamage(health, armor, armorblockpercent, DEATH_WEAPON);
 
                float x;
                x = floor(v_x + 1);
@@ -3736,6 +3736,22 @@ void HUD_InfoMessages(void)
                        s = _("^2Currently in ^1warmup^2 stage!");
                        drawInfoMessage(s)
                }
+               
+               if(autocvar_cl_showspectators)
+               if(num_spectators)
+               if not(spectatee_status)
+               {
+                       s = _("^1Spectating you:");
+                       drawInfoMessage(s)
+                       float limit = min(num_spectators, MAX_SPECTATORS);
+                       float i;
+                       for(i = 0; i < limit; ++i)
+                       {
+                               float slot = spectatorlist[i];
+                               s = strcat("^3", GetPlayerName(slot));
+                               drawInfoMessage(s)
+                       }
+               }
 
                string blinkcolor;
                if(mod(time, 1) >= 0.5)