]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/modicons.qc
Move 2 panel specific functions to their relative files
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / modicons.qc
index dcc4a8b093e4dd28f733e51a90d914c6f6894d7f..facb7cb94f22e3806f23f292e447db7fad703f5f 100644 (file)
@@ -485,6 +485,16 @@ float race_status_time;
 int race_status_prev;
 string race_status_name_prev;
 
+// Check if the given name already exist in race rankings? In that case, where? (otherwise return 0)
+int race_CheckName(string net_name)
+{
+       int i;
+       for (i=RANKINGS_CNT-1;i>=0;--i)
+               if(grecordholder[i] == net_name)
+                       return i+1;
+       return 0;
+}
+
 void race_showTime(string text, vector pos, vector timeText_ofs, float theTime, vector textSize, float f)
 {
        drawstring_aspect(pos, text, textSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);