From 7f4c553c01385fb6e4a5c97e2386fefe606f2e1c Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Fri, 21 Jan 2011 19:55:30 +0200 Subject: [PATCH] Better naming for the stats --- qcsrc/client/View.qc | 10 +++++----- qcsrc/common/constants.qh | 4 ++-- qcsrc/server/g_world.qc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 1535d8bad..2e083e880 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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); diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 5bf221560..2a086e916 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 29330651a..1460ac7c3 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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); -- 2.39.2