r5399 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Jan 4 10:36:50 EST 2009


Author: div0
Date: 2009-01-04 10:36:43 -0500 (Sun, 04 Jan 2009)
New Revision: 5399

Modified:
   trunk/data/qcsrc/server/w_hook.qc
   trunk/data/weapons.cfg
Log:
hook: subtract more ammo:
hook throwing = 2 cells
first 2 seconds are free
after that, remove 4 cells per extra second (in 0.25s intervals)


Modified: trunk/data/qcsrc/server/w_hook.qc
===================================================================
--- trunk/data/qcsrc/server/w_hook.qc	2009-01-04 03:06:23 UTC (rev 5398)
+++ trunk/data/qcsrc/server/w_hook.qc	2009-01-04 15:36:43 UTC (rev 5399)
@@ -6,8 +6,8 @@
 .float dmg_duration;
 .float dmg_last;
 .float hook_refire;
-.float hook_datehooked;
-.float hook_datehooked_delay;
+.float hook_time_hooked;
+.float hook_time_ammodecrease;
 
 void W_Hook_ExplodeThink (void)
 {
@@ -151,19 +151,19 @@
 			hooked_time_max = cvar("g_balance_hook_primary_hooked_time_max");			
 			if (hooked_time_max > 0)
 			{
-				if ( time > self.hook_datehooked + hooked_time_max )
+				if ( time > self.hook_time_hooked + hooked_time_max )
 					self.hook_state |= HOOK_REMOVING;
 			}
 			
 			hooked_ammodecrease_delay = cvar("g_balance_hook_primary_hooked_ammodecrease_delay");
 			if (hooked_ammodecrease_delay > 0)
 			{
-				if ( time > self.hook_datehooked_delay + hooked_ammodecrease_delay )
+				if ( time > self.hook_time_ammodecrease )
 				{
 					if ( self.ammo_cells >= 1 )
 					{
 						self.ammo_cells -= 1;
-						self.hook_datehooked_delay = time;
+						self.hook_time_ammodecrease = time + hooked_ammodecrease_delay;
 					}
 					else
 					{
@@ -174,7 +174,10 @@
 			}
 		}
 		else
-			self.hook_datehooked = self.hook_datehooked_delay = time;				
+		{
+			self.hook_time_hooked = time;				
+			self.hook_time_ammodecrease = time + cvar("g_balance_hook_primary_hooked_time_free");;
+		}
 
 		if (self.BUTTON_CROUCH)
 		{

Modified: trunk/data/weapons.cfg
===================================================================
--- trunk/data/weapons.cfg	2009-01-04 03:06:23 UTC (rev 5398)
+++ trunk/data/weapons.cfg	2009-01-04 15:36:43 UTC (rev 5399)
@@ -241,11 +241,12 @@
 set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
 
 // TESTING: on-hand hook with bomb
-set g_balance_hook_primary_ammo 1 // hook monkeys
-set g_balance_hook_primary_refire 0 // hook monkeys
+set g_balance_hook_primary_ammo 2 // hook monkeys set 0
+set g_balance_hook_primary_refire 0 // hook monkeys set 0
 set g_balance_hook_primary_animtime 0.3 // good shoot anim
 set g_balance_hook_primary_hooked_time_max 0 // infinite
-set g_balance_hook_primary_hooked_ammodecrease_delay 2.5 // no ammo used if nagative or 0
+set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
+set g_balance_hook_primary_hooked_ammodecrease_delay 0.25 // remove one cell every 0.25 seconds
 set g_balance_hook_secondary_damage 25 // not much
 set g_balance_hook_secondary_edgedamage 5 // not much
 set g_balance_hook_secondary_radius 500 // LOTS




More information about the nexuiz-commits mailing list