]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Better naming for the stats
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 21 Jan 2011 17:55:30 +0000 (19:55 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 21 Jan 2011 17:55:30 +0000 (19:55 +0200)
qcsrc/client/View.qc
qcsrc/common/constants.qh
qcsrc/server/g_world.qc

index 1535d8bad51ad1f76d37391e49e7c91cb5c31d77..2e083e880870a9c79510972be2590a8c960b6841 100644 (file)
@@ -850,7 +850,7 @@ void CSQC_UpdateView(float w, float h)
 
                        // TrueAim check
                        float shottype;
-                       float bullets, bullets_max, ring_scale;
+                       float weapon_load, weapon_clipsize, ring_scale;
                        // wcross_origin = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
                        wcross_origin = project_3d_to_2d(view_origin + MAX_SHOT_DISTANCE * view_forward);
                        wcross_origin_z = 0;
@@ -996,11 +996,11 @@ void CSQC_UpdateView(float w, float h)
                                nex_charge_movingavg = nex_charge;
 
                        // ring around crosshair representing bullets left in camping rifle clip
-                       bullets = getstati(STAT_BULLETS_LOADED);
-                       if (bullets)
+                       weapon_load = getstati(STAT_WEAPON_LOAD);
+                       if (weapon_load)
                        {
-                               bullets_max = getstati(STAT_BULLETS_MAX);
-                               f = bound(0, bullets / bullets_max, 1);
+                               weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);
+                               f = bound(0, weapon_load / weapon_clipsize, 1);
 
                                a = autocvar_crosshair_ring_sniperrifle_alpha;
                                DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
index 5bf221560caad2e1b177a47c8fa9a93f7d55a78d..2a086e9162f66ef3dcc987e1718299325af9c9a8 100644 (file)
@@ -307,8 +307,8 @@ const float STAT_FUEL = 44;
 const float STAT_NB_METERSTART = 45;
 const float STAT_SHOTORG = 46; // compressShotOrigin
 const float STAT_LEADLIMIT = 47;
-const float STAT_BULLETS_LOADED = 48;
-const float STAT_BULLETS_MAX = 49;
+const float STAT_WEAPON_LOAD = 48;
+const float STAT_WEAPON_CLIPSIZE = 49;
 const float STAT_NEX_CHARGE = 50;
 const float STAT_LAST_PICKUP = 51;
 const float STAT_HUD = 52;
index 29330651a8922de6a55542f9ac11ff471a7eb08a..1460ac7c34201151b6aa97cfb64e465f9df9746a 100644 (file)
@@ -818,8 +818,8 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_FUEL, AS_INT, ammo_fuel);
        addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
-       addstat(STAT_BULLETS_LOADED, AS_INT, ammo_counter);
-       addstat(STAT_BULLETS_MAX, AS_INT, ammo_max);
+       addstat(STAT_WEAPON_LOAD, AS_INT, ammo_counter);
+       addstat(STAT_WEAPON_CLIPSIZE, AS_INT, ammo_max);
        addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
 
        addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);