From 77281bfbe5b48c29b5cabfa62a11f9a3b339d291 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Wed, 17 Nov 2010 16:29:52 +0200 Subject: [PATCH] rename a couple of cvars: Nex ring does not show "nexvelocity" anymore, so let's just call that crosshair_ring_nex_* instead. Make the campingrifle follow the same scheme, with crosshair_ring_campingrifle_*. If we add more features in the future using the crosshair ring they can be renamed accordingly. --- balanceXonotic.cfg | 2 +- defaultXonotic.cfg | 21 ++++++++++++--------- qcsrc/client/View.qc | 16 ++++++++-------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index 8fe85667c..0f8ce88a7 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -469,7 +469,7 @@ set g_balance_nex_secondary_damage 0 set g_balance_nex_secondary_force 0 set g_balance_nex_secondary_refire 0 set g_balance_nex_secondary_animtime 0 -set g_balance_nex_secondary_ammo 0.25 +set g_balance_nex_secondary_ammo 0.25 // full charge pool is 1, so it depletes in 4 secs set g_balance_nex_secondary_damagefalloff_mindist 0 set g_balance_nex_secondary_damagefalloff_maxdist 0 set g_balance_nex_secondary_damagefalloff_halflife 0 diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 43280aba9..593bd77bf 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -178,16 +178,19 @@ seta crosshair_fireball "" "crosshair to display when wielding the fireball" seta crosshair_fireball_color "0.2 1.0 0.2" "crosshair color to display when wielding the fireball" seta crosshair_fireball_alpha 1 "crosshair alpha value to display when wielding the fireball" seta crosshair_fireball_size 1 "crosshair size when wielding the fireball" + +// ring around crosshair, used for various purposes (such as indicating bullets left in clip, nex charge) seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex" -seta crosshair_campingrifle_bulletcounter_alpha 0.15 - -seta crosshair_nexvelocity_alpha 0.15 -seta crosshair_nexvelocity_currentcharge_scale 30 -seta crosshair_nexvelocity_currentcharge_alpha 0.15 -seta crosshair_nexvelocity_currentcharge_color_red 0.8 -seta crosshair_nexvelocity_currentcharge_color_green 0 -seta crosshair_nexvelocity_currentcharge_color_blue 0 -seta crosshair_nexvelocity_currentcharge_movingavg_rate 0.05 + +seta crosshair_ring_campingrifle_alpha 0.15 + +seta crosshair_ring_nex_outer_alpha 0.15 +seta crosshair_ring_nex_inner_alpha 0.15 +seta crosshair_ring_nex_inner_color_red 0.8 +seta crosshair_ring_nex_inner_color_green 0 +seta crosshair_ring_nex_inner_color_blue 0 +seta crosshair_ring_nex_currentcharge_scale 30 +seta crosshair_ring_nex_currentcharge_movingavg_rate 0.05 seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)" seta cl_reticle_item_nex 1 "draw aiming recticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index ffe03d852..2d9bc563f 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -867,7 +867,7 @@ void CSQC_UpdateView(float w, float h) bullets = getstati(STAT_BULLETS_LOADED); f = bound(0, bullets / cr_maxbullets, 1); - a = cvar("crosshair_campingrifle_bulletcounter_alpha"); + a = cvar("crosshair_ring_campingrifle_alpha"); DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE); } else if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex @@ -877,22 +877,22 @@ void CSQC_UpdateView(float w, float h) { use_nex_charge_pool = 1; - a = cvar("crosshair_nexvelocity_alpha"); - rgb = eX * cvar("crosshair_nexvelocity_currentcharge_color_red") + eY * cvar("crosshair_nexvelocity_currentcharge_color_green") + eZ * cvar("crosshair_nexvelocity_currentcharge_color_blue"); + a = cvar("crosshair_ring_nex_inner_alpha"); + rgb = eX * cvar("crosshair_ring_nex_inner_color_red") + eY * cvar("crosshair_ring_nex_inner_color_green") + eZ * cvar("crosshair_ring_nex_inner_color_blue"); DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", nex_charge_pool, rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE); } else { // indicate how much we're charging right now with an inner circle - a = cvar("crosshair_nexvelocity_currentcharge_alpha"); - nex_charge_movingavg = (1 - cvar("crosshair_nexvelocity_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_nexvelocity_currentcharge_movingavg_rate") * nex_charge; + a = cvar("crosshair_ring_nex_inner_alpha"); + nex_charge_movingavg = (1 - cvar("crosshair_ring_nex_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_ring_nex_currentcharge_movingavg_rate") * nex_charge; - rgb = eX * cvar("crosshair_nexvelocity_currentcharge_color_red") + eY * cvar("crosshair_nexvelocity_currentcharge_color_green") + eZ * cvar("crosshair_nexvelocity_currentcharge_color_blue"); - DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE); + rgb = eX * cvar("crosshair_ring_nex_inner_color_red") + eY * cvar("crosshair_ring_nex_inner_color_green") + eZ * cvar("crosshair_ring_nex_inner_color_blue"); + DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_ring_nex_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE); } // draw the charge - a = cvar("crosshair_nexvelocity_alpha"); + a = cvar("crosshair_ring_nex_outer_alpha"); DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE); } -- 2.39.2