]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/sbar.qc
eater -> predator, because that's a more correct word
[voretournament/voretournament.git] / data / qcsrc / client / sbar.qc
index 91a3c3dfb5bfabf4d0c8195308379e304dc7c4b9..9b3db2e22a2bf0087c687e560758dfad1eaf43a1 100644 (file)
@@ -508,15 +508,15 @@ void Cmd_Sbar_SetFields(float argc)
                        sbar_field[sbar_num_fields] = SP_SEPARATOR;\r
                        have_separator = 1;\r
                } else {\r
+                       if(gametype == GAME_RPG)\r
+                               return;\r
+\r
                        for(j = 0; j < MAX_SCORE; ++j)\r
                                if(str == strtolower(scores_label[j]))\r
                                        goto found; // sorry, but otherwise fteqcc -O3 miscompiles this and warns about "unreachable code"\r
 :notfound\r
                        if(str == "frags")\r
-                       {\r
-                               if not(gametype == GAME_RPG)\r
-                                       j = SP_FRAGS;\r
-                       }\r
+                               j = SP_FRAGS;\r
                        else\r
                        {\r
                                if not(nocomplain)\r
@@ -1003,7 +1003,7 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl)
 float fieldcounter2;\r
 void Sbar_PrintStomachboardItemPred(vector pos, entity pl)\r
 {\r
-       // shows the name of our eater\r
+       // shows the name of our predator\r
 \r
        string str;\r
        float f, field, field_number;\r
@@ -2987,13 +2987,13 @@ void Sbar_Draw (void)
                                continue;\r
 \r
                        if(getstati(STAT_VORE_EATEN))\r
-                               f = pl.pleater == getstati(STAT_VORE_EATEN);\r
+                               f = pl.plpredator == getstati(STAT_VORE_EATEN);\r
                        else\r
                        {\r
                                if(spectatee_status)\r
-                                       f = pl.pleater == spectatee_status;\r
+                                       f = pl.plpredator == spectatee_status;\r
                                else\r
-                                       f = pl.pleater == player_localentnum;\r
+                                       f = pl.plpredator == player_localentnum;\r
                        }\r
 \r
                        if(f)\r
@@ -3075,6 +3075,16 @@ void Sbar_Draw (void)
                        CSQC_ctf_hud();\r
                else if(gametype == GAME_CTS || gametype == GAME_RACE)\r
                        CSQC_race_hud();\r
+\r
+               // draw the canleave message\r
+               if(getstati(STAT_VORE_CANLEAVE))\r
+               if not(spectatee_status) // this message doesn't address spectated players\r
+               {\r
+                       s = strcat("^7Press ^3", getcommandkey("jump", "+jump"), " ^7to exit");\r
+                       pos_x = bottom_x - stringwidth(s, TRUE, '0 0 0') * 16 / 2;\r
+                       pos_y = bottom_y - 120;\r
+                       drawcolorcodedstring(pos, s, '16 16 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+               }\r
        }\r
        return;\r
 }\r