From: Mario Date: Sat, 14 Nov 2015 12:59:39 +0000 (+1000) Subject: Port leadlimit X-Git-Tag: xonotic-v0.8.2~1609^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ae4bc34dbc05aa4e651558ed077e8e0ad726707f;p=xonotic%2Fxonotic-data.pk3dir.git Port leadlimit --- diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 681183594..e15ca8a07 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -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) diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 8aed9b75c..1f5f89fd0 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -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, diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 2d747cd59..2ed37abf4 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -454,7 +454,7 @@ string matchid; .float damage_dealt_total; -.float stat_leadlimit; +.float stat_leadlimit = _STAT(LEADLIMIT); bool radar_showennemies; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 84f1464b1..810da9c50 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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);