[nexuiz-commits] r7177 - in trunk/data: . gfx gfx/hud qcsrc/client qcsrc/common qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jul 10 14:30:23 EDT 2009


Author: div0
Date: 2009-07-10 14:30:22 -0400 (Fri, 10 Jul 2009)
New Revision: 7177

Added:
   trunk/data/gfx/hud/rifle_ring_1.tga
   trunk/data/gfx/hud/rifle_ring_2.tga
   trunk/data/gfx/hud/rifle_ring_3.tga
   trunk/data/gfx/hud/rifle_ring_4.tga
   trunk/data/gfx/hud/rifle_ring_5.tga
   trunk/data/gfx/hud/rifle_ring_6.tga
   trunk/data/gfx/hud/rifle_ring_7.tga
   trunk/data/gfx/hud/rifle_ring_8.tga
Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/gfx/crosshaircampingrifle.tga
   trunk/data/gfx/crosshaircrylink.tga
   trunk/data/gfx/crosshairelectro.tga
   trunk/data/gfx/crosshairgrenadelauncher.tga
   trunk/data/gfx/crosshairhagar.tga
   trunk/data/gfx/crosshairhlac.tga
   trunk/data/gfx/crosshairhook.tga
   trunk/data/gfx/crosshairminstanex.tga
   trunk/data/gfx/crosshairporto.tga
   trunk/data/gfx/crosshairseeker.tga
   trunk/data/gfx/crosshairuzi.tga
   trunk/data/qcsrc/client/View.qc
   trunk/data/qcsrc/common/constants.qh
   trunk/data/qcsrc/server/defs.qh
   trunk/data/qcsrc/server/g_world.qc
   trunk/data/qcsrc/server/w_campingrifle.qc
   trunk/data/weapons.cfg
Log:
rifle bullet counter indicator
no longer needs to reload after switch!


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-07-10 18:12:43 UTC (rev 7176)
+++ trunk/data/defaultNexuiz.cfg	2009-07-10 18:30:22 UTC (rev 7177)
@@ -113,25 +113,25 @@
 seta crosshair_uzi_color_green 0.9	"crosshair color green component to display when wielding the machinegun"
 seta crosshair_uzi_color_blue 0.35	"crosshair color blue component to display when wielding the machinegun"
 seta crosshair_uzi_color_alpha 0.9	"crosshair alpha value to display when wielding the machinegun"
-seta crosshair_uzi_size 1.125	"crosshair size when wielding the machinegun"
+seta crosshair_uzi_size 0.6	"crosshair size when wielding the machinegun"
 seta crosshair_grenadelauncher ""	"crosshair to display when wielding the mortar"
 seta crosshair_grenadelauncher_color_red 1	"crosshair color red component to display when wielding the mortar"
 seta crosshair_grenadelauncher_color_green 0.15	"crosshair color green component to display when wielding the mortar"
 seta crosshair_grenadelauncher_color_blue 0	"crosshair color blue component to display when wielding the mortar"
 seta crosshair_grenadelauncher_color_alpha 1.15	"crosshair alpha value to display when wielding the mortar"
-seta crosshair_grenadelauncher_size 1.35	"crosshair size when wielding the mortar"
+seta crosshair_grenadelauncher_size 0.7	"crosshair size when wielding the mortar"
 seta crosshair_electro ""	"crosshair to display when wielding the electro"
 seta crosshair_electro_color_red 0.35	"crosshair color red component to display when wielding the electro"
 seta crosshair_electro_color_green 0.5	"crosshair color green component to display when wielding the electro"
 seta crosshair_electro_color_blue 1	"crosshair color blue component to display when wielding the electro"
 seta crosshair_electro_color_alpha 1	"crosshair alpha value to display when wielding the electro"
-seta crosshair_electro_size 0.95	"crosshair size when wielding the electro"
+seta crosshair_electro_size 0.5	"crosshair size when wielding the electro"
 seta crosshair_crylink ""	"crosshair to display when wielding the crylink"
 seta crosshair_crylink_color_red 0.85	"crosshair color red component to display when wielding the crylink"
 seta crosshair_crylink_color_green 0.25	"crosshair color green component to display when wielding the crylink"
 seta crosshair_crylink_color_blue 1	"crosshair color blue component to display when wielding the crylink"
 seta crosshair_crylink_color_alpha 0.85	"crosshair alpha value to display when wielding the crylink"
-seta crosshair_crylink_size 0.725	"crosshair size when wielding the crylink"
+seta crosshair_crylink_size 0.4	"crosshair size when wielding the crylink"
 seta crosshair_nex ""	"crosshair to display when wielding the nex gun"
 seta crosshair_nex_color_red 0	"crosshair color red component to display when wielding the nex gun"
 seta crosshair_nex_color_green 0.9	"crosshair color green component to display when wielding the nex gun"
@@ -143,7 +143,7 @@
 seta crosshair_hagar_color_green 0.5	"crosshair color green component to display when wielding the hagar"
 seta crosshair_hagar_color_blue 0.35	"crosshair color blue component to display when wielding the hagar"
 seta crosshair_hagar_color_alpha 1	"crosshair alpha value to display when wielding the hagar"
-seta crosshair_hagar_size 1.3	"crosshair size when wielding the hagar"
+seta crosshair_hagar_size 0.8	"crosshair size when wielding the hagar"
 seta crosshair_rocketlauncher ""	"crosshair to display when wielding the rocketlauncher"
 seta crosshair_rocketlauncher_color_red 1	"crosshair color red component to display when wielding the rocketlauncher"
 seta crosshair_rocketlauncher_color_green 0.75	"crosshair color green component to display when wielding the rocketlauncher"
@@ -155,37 +155,38 @@
 seta crosshair_porto_color_green 1	"crosshair color green component to display when wielding the porto"
 seta crosshair_porto_color_blue 0.5	"crosshair color blue component to display when wielding the porto"
 seta crosshair_porto_color_alpha 0.85	"crosshair alpha value to display when wielding the porto"
-seta crosshair_porto_size 1.35	"crosshair size when wielding the porto"
+seta crosshair_porto_size 0.6	"crosshair size when wielding the porto"
 seta crosshair_minstanex ""	"crosshair to display when wielding the minstanex gun"
 seta crosshair_minstanex_color_red 0.65	"crosshair color red component to display when wielding the minstanex gun"
 seta crosshair_minstanex_color_green 0.65	"crosshair color green component to display when wielding the minstanex gun"
 seta crosshair_minstanex_color_blue 1	"crosshair color blue component to display when wielding the minstanex gun"
 seta crosshair_minstanex_color_alpha 1	"crosshair alpha value to display when wielding the minstanex gun"
-seta crosshair_minstanex_size 0.65	"crosshair size when wielding the minstanex gun"
+seta crosshair_minstanex_size 0.4	"crosshair size when wielding the minstanex gun"
 seta crosshair_hook ""	"crosshair to display when wielding the hook"
 seta crosshair_hook_color_red 0.65	"crosshair color red component to display when wielding the hook"
 seta crosshair_hook_color_green 1	"crosshair color green component to display when wielding the hook"
 seta crosshair_hook_color_blue 0.85	"crosshair color blue component to display when wielding the hook"
 seta crosshair_hook_color_alpha 0.85	"crosshair alpha value to display when wielding the hook"
-seta crosshair_hook_size 1.1	"crosshair size when wielding the hook"
+seta crosshair_hook_size 0.5	"crosshair size when wielding the hook"
 seta crosshair_hlac ""	"crosshair to display when wielding the H.L.A.C"
 seta crosshair_hlac_color_red 1	"crosshair color red component to display when wielding the H.L.A.C."
 seta crosshair_hlac_color_green 0.65	"crosshair color green component to display when wielding the H.L.A.C."
 seta crosshair_hlac_color_blue 0.2	"crosshair color blue component to display when wielding the H.L.A.C."
 seta crosshair_hlac_color_alpha 1	"crosshair alpha value to display when wielding the H.L.A.C."
-seta crosshair_hlac_size 2	"crosshair size when wielding the H.L.A.C."
+seta crosshair_hlac_size 0.6	"crosshair size when wielding the H.L.A.C."
 seta crosshair_seeker ""	"crosshair to display when wielding the TAG Seeker"
 seta crosshair_seeker_color_red 1	"crosshair color red component to display when wielding the TAG seeker"
 seta crosshair_seeker_color_green 0.35	"crosshair color green component to display when wielding the TAG seeker"
 seta crosshair_seeker_color_blue 0.35	"crosshair color blue component to display when wielding the TAG seeker"
 seta crosshair_seeker_color_alpha 0.9	"crosshair alpha value to display when wielding the TAG seeker"
-seta crosshair_seeker_size 1.15	"crosshair size when wielding the TAG seeker"
+seta crosshair_seeker_size 0.8	"crosshair size when wielding the TAG seeker"
 seta crosshair_campingrifle ""	"crosshair to display when wielding the campingrifle"
 seta crosshair_campingrifle_color_red 0.85	"crosshair color red component to display when wielding the campingrifle"
 seta crosshair_campingrifle_color_green 0.5	"crosshair color green component to display when wielding the campingrifle"
 seta crosshair_campingrifle_color_blue 0.25	"crosshair color blue component to display when wielding the campingrifle"
 seta crosshair_campingrifle_color_alpha 1	"crosshair alpha value to display when wielding the campingrifle"
-seta crosshair_campingrifle_size 0.85	"crosshair size when wielding the campingrifle"
+seta crosshair_campingrifle_size 0.65	"crosshair size when wielding the campingrifle"
+seta crosshair_campingrifle_ring_size 1.5	"bullet counter ring size around campingrifle crosshair, multiple of crosshair_campingrifle_size"
 seta crosshair_tuba ""	"crosshair to display when wielding the tuba"
 seta crosshair_tuba_color_red 0.85	"crosshair color red component to display when wielding the tuba"
 seta crosshair_tuba_color_green 0.5	"crosshair color green component to display when wielding the tuba"

Modified: trunk/data/gfx/crosshaircampingrifle.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshaircrylink.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairelectro.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairgrenadelauncher.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairhagar.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairhlac.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairhook.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairminstanex.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairporto.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairseeker.tga
===================================================================
(Binary files differ)

Modified: trunk/data/gfx/crosshairuzi.tga
===================================================================
(Binary files differ)

Added: trunk/data/gfx/hud/rifle_ring_1.tga
===================================================================
(Binary files differ)


Property changes on: trunk/data/gfx/hud/rifle_ring_1.tga
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/data/gfx/hud/rifle_ring_2.tga
===================================================================
(Binary files differ)


Property changes on: trunk/data/gfx/hud/rifle_ring_2.tga
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/data/gfx/hud/rifle_ring_3.tga
===================================================================
(Binary files differ)


Property changes on: trunk/data/gfx/hud/rifle_ring_3.tga
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/data/gfx/hud/rifle_ring_4.tga
===================================================================
(Binary files differ)


Property changes on: trunk/data/gfx/hud/rifle_ring_4.tga
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/data/gfx/hud/rifle_ring_5.tga
===================================================================
(Binary files differ)


Property changes on: trunk/data/gfx/hud/rifle_ring_5.tga
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/data/gfx/hud/rifle_ring_6.tga
===================================================================
(Binary files differ)


Property changes on: trunk/data/gfx/hud/rifle_ring_6.tga
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/data/gfx/hud/rifle_ring_7.tga
===================================================================
(Binary files differ)


Property changes on: trunk/data/gfx/hud/rifle_ring_7.tga
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/data/gfx/hud/rifle_ring_8.tga
===================================================================
(Binary files differ)


Property changes on: trunk/data/gfx/hud/rifle_ring_8.tga
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc	2009-07-10 18:12:43 UTC (rev 7176)
+++ trunk/data/qcsrc/client/View.qc	2009-07-10 18:30:22 UTC (rev 7177)
@@ -563,6 +563,7 @@
         if(!scoreboard_active && !ons_showmap && !camera_active) {
             // TrueAim check
             float shottype;
+			float bullets, ring_scale;
 
             if(cvar("crosshair_hittest"))
                 shottype = TrueAimCheck();
@@ -613,9 +614,20 @@
                 wcross_size = drawgetimagesize(wcross_name);
                 wcross_size_x *= wcross_sizefloat;
                 wcross_size_y *= wcross_sizefloat;
-
+				
+				// ring around crosshair representing bullets left in camping rifle clip
+				if (activeweapon == WEP_CAMPINGRIFLE)
+				{
+					ring_scale = cvar("crosshair_campingrifle_ring_size");
+					bullets = bound(0, getstati(STAT_BULLETS_LOADED), 8);
+				}
+				else
+					bullets = 0;
+				
                 if(shottype == SHOTTYPE_HITENEMY || shottype == SHOTTYPE_HITWORLD)
                 {
+					if (bullets)
+						drawpic('0.5 0 0' * (vid_conwidth - wcross_size_x * ring_scale) + '0 0.5 0' * (vid_conheight - wcross_size_y * ring_scale), strcat("gfx/hud/rifle_ring_", ftos(bullets)), wcross_size * ring_scale, wcross_color, wcross_alpha, DRAWFLAG_NORMAL);
                     drawpic('0.5 0 0' * (vid_conwidth - wcross_size_x) + '0 0.5 0' * (vid_conheight - wcross_size_y), wcross_name, wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL);
                 }
                 else
@@ -623,7 +635,11 @@
                     wcross_alpha *= 0.04 * 0.75;
                     for(i = -2; i <= 2; ++i)
                         for(j = -2; j <= 2; ++j)
+						{
+							if (bullets)
+								drawpic('0.5 0 0' * (vid_conwidth - wcross_size_x * ring_scale + i) + '0 0.5 0' * (vid_conheight - wcross_size_y * ring_scale + j), strcat("gfx/hud/rifle_ring_", ftos(bullets)), wcross_size * ring_scale, wcross_color, wcross_alpha, DRAWFLAG_NORMAL);
                             drawpic('0.5 0 0' * (vid_conwidth - wcross_size_x + i) + '0 0.5 0' * (vid_conheight - wcross_size_y + j), wcross_name, wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL);
+						}
                 }
             }
         }

Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh	2009-07-10 18:12:43 UTC (rev 7176)
+++ trunk/data/qcsrc/common/constants.qh	2009-07-10 18:30:22 UTC (rev 7177)
@@ -257,6 +257,7 @@
 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 CTF_STATE_ATTACK = 1;
 const float CTF_STATE_DEFEND = 2;
 const float CTF_STATE_COMMANDER = 3;

Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh	2009-07-10 18:12:43 UTC (rev 7176)
+++ trunk/data/qcsrc/server/defs.qh	2009-07-10 18:30:22 UTC (rev 7177)
@@ -605,3 +605,5 @@
 float client_cefc_accumulator;
 float client_cefc_accumulatortime;
 #endif
+
+.float campingrifle_bulletcounter;

Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2009-07-10 18:12:43 UTC (rev 7176)
+++ trunk/data/qcsrc/server/g_world.qc	2009-07-10 18:30:22 UTC (rev 7177)
@@ -598,6 +598,7 @@
  	addstat(STAT_DAMAGE_FIRED, AS_INT, maxdamage_fired);
 	addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
 	addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
+	addstat(STAT_BULLETS_LOADED, AS_INT, campingrifle_bulletcounter);
 
 	next_pingtime = time + 5;
 	InitializeEntity(self, cvar_changes_init, INITPRIO_CVARS);

Modified: trunk/data/qcsrc/server/w_campingrifle.qc
===================================================================
--- trunk/data/qcsrc/server/w_campingrifle.qc	2009-07-10 18:12:43 UTC (rev 7176)
+++ trunk/data/qcsrc/server/w_campingrifle.qc	2009-07-10 18:30:22 UTC (rev 7177)
@@ -2,8 +2,6 @@
 //* Manually operating the bolt means that all the power of the gas is used to propell the bullet. In this mode the bolt is prevented from moving backwards in response to the firing of the bullet.
 //** In fully automatic mode some of the gas is used to extract and reload the next cartrige, thus there is less power and range.
 
-.float campingrifle_bulletcounter;
-
 void W_Campingrifle_ReloadedAndReady()
 {
 	float t;

Modified: trunk/data/weapons.cfg
===================================================================
--- trunk/data/weapons.cfg	2009-07-10 18:12:43 UTC (rev 7176)
+++ trunk/data/weapons.cfg	2009-07-10 18:30:22 UTC (rev 7177)
@@ -398,9 +398,9 @@
 
 set g_balance_campingrifle_magazinecapacity 8
 set g_balance_campingrifle_reloadtime 2 // matches reload anim
-set g_balance_campingrifle_auto_reload_after_changing_weapons 1
+set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_primary_damage 60
-set g_balance_campingrifle_primary_headshotaddeddamage 100
+set g_balance_campingrifle_primary_headshotaddeddamage 80
 set g_balance_campingrifle_primary_spread 0
 set g_balance_campingrifle_primary_force 2
 set g_balance_campingrifle_primary_speed 35000



More information about the nexuiz-commits mailing list