]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sbar.c
add a "freeslots" field to the host cache
[xonotic/darkplaces.git] / sbar.c
diff --git a/sbar.c b/sbar.c
index 0e673576f069a6e7772cfe1d70c2c5a514e31583..4ceda890bfac528e79c5cd08d1a595f773bef4de 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -110,6 +110,8 @@ void Sbar_DeathmatchOverlay (void);
 void Sbar_IntermissionOverlay (void);
 void Sbar_FinaleOverlay (void);
 
+void CL_VM_UpdateShowingScoresState (int showingscores);
+
 
 /*
 ===============
@@ -123,6 +125,7 @@ void Sbar_ShowScores (void)
        if (sb_showscores)
                return;
        sb_showscores = true;
+       CL_VM_UpdateShowingScoresState(sb_showscores);
 }
 
 /*
@@ -135,6 +138,7 @@ Tab key up
 void Sbar_DontShowScores (void)
 {
        sb_showscores = false;
+       CL_VM_UpdateShowingScoresState(sb_showscores);
 }
 
 void sbar_start(void)
@@ -1234,10 +1238,14 @@ void Sbar_Draw (void)
                                if (cl.stats[STAT_ARMOR] > 0)
                                {
                                        Sbar_DrawStretchPic (0, 0, sb_armor[0], sbar_alpha_fg.value, 24, 24);
-                                       if(cl.stats[STAT_ARMOR] > 100)
-                                               Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,1,1,0,1,0);
-                                       else if(cl.stats[STAT_ARMOR] > 25)
+                                       if(cl.stats[STAT_ARMOR] > 200)
+                                               Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,0,1,0,1,0);
+                                       else if(cl.stats[STAT_ARMOR] > 100)
+                                               Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,0.2,1,0.2,1,0);
+                                       else if(cl.stats[STAT_ARMOR] > 50)
                                                Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,0.6,0.7,0.8,1,0);
+                                       else if(cl.stats[STAT_ARMOR] > 25)
+                                               Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,1,1,0.2,1,0);
                                        else
                                                Sbar_DrawXNum(24,0,cl.stats[STAT_ARMOR],3,24,0.7,0,0,1,0);
                                }
@@ -1246,10 +1254,14 @@ void Sbar_Draw (void)
                                if (cl.stats[STAT_HEALTH] != 0)
                                {
                                        Sbar_DrawStretchPic (112, 0, sb_health, sbar_alpha_fg.value, 24, 24);
-                                       if(cl.stats[STAT_HEALTH] > 100)
-                                               Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,1,1,0,1,0);
-                                       else if(cl.stats[STAT_HEALTH] > 25)
+                                       if(cl.stats[STAT_HEALTH] > 200)
+                                               Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,0,1,0,1,0);
+                                       else if(cl.stats[STAT_HEALTH] > 100)
+                                               Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,0.2,1,0.2,1,0);
+                                       else if(cl.stats[STAT_HEALTH] > 50)
                                                Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,0.6,0.7,0.8,1,0);
+                                       else if(cl.stats[STAT_HEALTH] > 25)
+                                               Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,1,1,0.2,1,0);
                                        else
                                                Sbar_DrawXNum(136,0,cl.stats[STAT_HEALTH],3,24,0.7,0,0,1,0);
                                }
@@ -1656,7 +1668,7 @@ void Sbar_DeathmatchOverlay (void)
                        MSG_WriteByte(&cls.netcon->message, qw_clc_stringcmd);
                        MSG_WriteString(&cls.netcon->message, "pings");
                }
-               else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4 || cls.protocol == PROTOCOL_DARKPLACES5 || cls.protocol == PROTOCOL_DARKPLACES6/* || cls.protocol == PROTOCOL_DARKPLACES7*/)
+               else if (cls.protocol == PROTOCOL_QUAKE || cls.protocol == PROTOCOL_QUAKEDP || cls.protocol == PROTOCOL_NEHAHRAMOVIE || cls.protocol == PROTOCOL_NEHAHRABJP || cls.protocol == PROTOCOL_NEHAHRABJP2 || cls.protocol == PROTOCOL_NEHAHRABJP3 || cls.protocol == PROTOCOL_DARKPLACES1 || cls.protocol == PROTOCOL_DARKPLACES2 || cls.protocol == PROTOCOL_DARKPLACES3 || cls.protocol == PROTOCOL_DARKPLACES4 || cls.protocol == PROTOCOL_DARKPLACES5 || cls.protocol == PROTOCOL_DARKPLACES6/* || cls.protocol == PROTOCOL_DARKPLACES7*/)
                {
                        // these servers usually lack the pings command and so a less efficient "ping" command must be sent, which on modern DP servers will also reply with a pingplreport command after the ping listing
                        static int ping_anyway_counter = 0;