]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Port leadlimit
authorMario <mario@smbclan.net>
Sat, 14 Nov 2015 12:59:39 +0000 (22:59 +1000)
committerMario <mario@smbclan.net>
Sat, 14 Nov 2015 12:59:39 +0000 (22:59 +1000)
qcsrc/client/scoreboard.qc
qcsrc/common/stats.qh
qcsrc/server/defs.qh
qcsrc/server/g_world.qc

index 681183594f2efdc550a08c0147698e1b6cadb871..e15ca8a07f2dd99b18fe1074f75c212c148967a2 100644 (file)
@@ -1404,7 +1404,7 @@ void HUD_DrawScoreboard()
        str = sprintf(_("playing ^3%s^7 on ^2%s^7"), MapInfo_Type_ToText(gametype), shortmapname);
        tl = getstatf(STAT_TIMELIMIT);
        fl = getstatf(STAT_FRAGLIMIT);
-       ll = getstatf(STAT_LEADLIMIT);
+       ll = STAT(LEADLIMIT);
        if(gametype == MAPINFO_TYPE_LMS)
        {
                if(tl > 0)
index 8aed9b75c99fa83cb445aa2918b5321def10b90c..1f5f89fd0cdfc8cb44dbb0d75bc3b3f2508565a7 100644 (file)
@@ -89,7 +89,7 @@ enum {
     STAT_LAST_VECTOR
 };
 
-const int REGISTERED_STATS = 11;
+const int REGISTERED_STATS = 12;
 
 REGISTER_STAT(KH_KEYS, int)
 /** weapon requested to switch to; next WANTED weapon (for HUD) */
@@ -106,11 +106,11 @@ REGISTER_STAT(FUEL, int)
 REGISTER_STAT(NB_METERSTART, float)
 /** compressShotOrigin */
 REGISTER_STAT(SHOTORG, int)
+REGISTER_STAT(LEADLIMIT, float)
 
 enum {
     STAT_FIRST_MAIN = (STAT_LAST_VECTOR - 1) + REGISTERED_STATS,
 
-    STAT_LEADLIMIT,
     STAT_WEAPON_CLIPLOAD,
     STAT_WEAPON_CLIPSIZE,
     STAT_VORTEX_CHARGE,
index 2d747cd59e5affb0f92d47c245e7909ff86c795b..2ed37abf4bf6adfd81edf2449fc663cb238cf4c2 100644 (file)
@@ -454,7 +454,7 @@ string matchid;
 
 .float damage_dealt_total;
 
-.float stat_leadlimit;
+.float stat_leadlimit = _STAT(LEADLIMIT);
 
 bool radar_showennemies;
 
index 84f1464b175453af615688a869ea093d7211498e..810da9c50b49e2773c384b736a6263f0b473789d 100644 (file)
@@ -763,7 +763,6 @@ spawnfunc(worldspawn)
 
        addstat(STAT_SUPERWEAPONS_FINISHED, AS_FLOAT, superweapons_finished);
        addstat(STAT_PLASMA, AS_INT, ammo_plasma);
-       addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
        addstat(STAT_WEAPON_CLIPLOAD, AS_INT, clip_load);
        addstat(STAT_WEAPON_CLIPSIZE, AS_INT, clip_size);
        addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);