]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/Mario/hook_refire'
authorRudolf Polzer <divverent@xonotic.org>
Wed, 4 Jun 2014 09:32:05 +0000 (11:32 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 4 Jun 2014 09:32:05 +0000 (11:32 +0200)
* origin/Mario/hook_refire:
  Add a new cvar for offhand hook refire
  Obey refire delay in offhand hook mode
  Also add delay to Nexuiz balance
  Add a 0.2 second delay on grappling hook to prevent spam

balance25.cfg
balanceFruitieX.cfg
balanceXDF.cfg
balanceXPM.cfg
balanceXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/g_hook.qc

index f0cc7d73b40baa7681349b3f7943015408f09ef0..be0e84f3f1c7e99b68242e09d173b0fa3eddc033 100644 (file)
@@ -223,6 +223,7 @@ set g_balance_grapplehook_stretch 50
 set g_balance_grapplehook_airfriction 0.2
 set g_balance_grapplehook_health 130
 set g_balance_grapplehook_damagedbycontents 0
+set g_balance_grapplehook_refire 0.2
 // }}}
 
 // {{{ weapon properties
@@ -629,7 +630,7 @@ set g_balance_portal_lifetime 15 // these get recharged whenever the portal is u
 // }}}
 // {{{ hook
 set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
+set g_balance_hook_primary_refire 0.2 // 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_time_free 2 // 2s being hooked are free
index 948d7e4b9eb6de3124259bdd18a4134d3a00c6d6..99d458d1d75275c639a7e730b6daf59eb1646df2 100644 (file)
@@ -223,6 +223,7 @@ set g_balance_grapplehook_stretch 50
 set g_balance_grapplehook_airfriction 0.2
 set g_balance_grapplehook_health 130
 set g_balance_grapplehook_damagedbycontents 0
+set g_balance_grapplehook_refire 0.2
 // }}}
 
 // {{{ weapon properties
@@ -629,7 +630,7 @@ set g_balance_portal_lifetime 15 // these get recharged whenever the portal is u
 // }}}
 // {{{ hook
 set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
+set g_balance_hook_primary_refire 0.2 // hook monkeys set 0
 set g_balance_hook_primary_animtime 0.2 // good shoot anim
 set g_balance_hook_primary_hooked_time_max 0 // infinite
 set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
index b7d3e02656caf0f73c842e6d1d955aace507d0ce..41d1936193c6ce42177ccdf2bbc3f29d97bdbe67 100644 (file)
@@ -223,6 +223,7 @@ set g_balance_grapplehook_stretch 50
 set g_balance_grapplehook_airfriction 0.2
 set g_balance_grapplehook_health 130
 set g_balance_grapplehook_damagedbycontents 0
+set g_balance_grapplehook_refire 0.2
 // }}}
 
 // {{{ weapon properties
@@ -629,7 +630,7 @@ set g_balance_portal_lifetime 15 // these get recharged whenever the portal is u
 // }}}
 // {{{ hook
 set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
+set g_balance_hook_primary_refire 0.2 // 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_time_free 2 // 2s being hooked are free
index 843e16a8357fbeae5fbb5a170919cd4e2f154f0c..f560aee10b0aa9ec9954797863fa878913f852a0 100644 (file)
@@ -223,6 +223,7 @@ set g_balance_grapplehook_stretch 50
 set g_balance_grapplehook_airfriction 0.2
 set g_balance_grapplehook_health 50
 set g_balance_grapplehook_damagedbycontents 1
+set g_balance_grapplehook_refire 0.2
 // }}}
 
 // {{{ weapon properties
@@ -629,7 +630,7 @@ set g_balance_portal_lifetime 15 // these get recharged whenever the portal is u
 // }}}
 // {{{ hook
 set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
+set g_balance_hook_primary_refire 0.2 // 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_time_free 2 // 2s being hooked are free
index de865fa68087ba37804aeaa36aac0b3f0091d80a..198801547281fc7a7df7715e962a71cb49665c8e 100644 (file)
@@ -223,6 +223,7 @@ set g_balance_grapplehook_stretch 50
 set g_balance_grapplehook_airfriction 0.2
 set g_balance_grapplehook_health 50
 set g_balance_grapplehook_damagedbycontents 1
+set g_balance_grapplehook_refire 0.2
 // }}}
 
 // {{{ weapon properties
@@ -629,7 +630,7 @@ set g_balance_portal_lifetime 15 // these get recharged whenever the portal is u
 // }}}
 // {{{ hook
 set g_balance_hook_primary_fuel 5 // hook monkeys set 0
-set g_balance_hook_primary_refire 0 // hook monkeys set 0
+set g_balance_hook_primary_refire 0.2 // 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_time_free 2 // 2s being hooked are free
index ee7d24d8b95ca0155dd3a7612c60a2740edd506d..080d701d866c083a81858fa90e22ae048e8f5111 100644 (file)
@@ -260,6 +260,7 @@ float autocvar_g_balance_grapplehook_speed_fly;
 float autocvar_g_balance_grapplehook_speed_pull;
 float autocvar_g_balance_grapplehook_stretch;
 float autocvar_g_balance_grapplehook_damagedbycontents;
+float autocvar_g_balance_grapplehook_refire;
 float autocvar_g_balance_grenadelauncher_bouncefactor;
 float autocvar_g_balance_grenadelauncher_bouncestop;
 float autocvar_g_balance_grenadelauncher_primary_ammo;
index 0df6ba0aee59c4cc5a070ce9f20bdc6da263d50c..4e1b634008fb6d063f760a4f2f747af352363bcd 100644 (file)
@@ -383,7 +383,7 @@ void GrapplingHookFrame()
                // offhand hook controls
                if(self.BUTTON_HOOK)
                {
-                       if (!(self.hook || (self.hook_state & HOOK_WAITING_FOR_RELEASE)))
+                       if (!(self.hook || (self.hook_state & HOOK_WAITING_FOR_RELEASE)) && (time > self.hook_refire))
                        {
                                self.hook_state |= HOOK_FIRING;
                                self.hook_state |= HOOK_WAITING_FOR_RELEASE;
@@ -426,6 +426,7 @@ void GrapplingHookFrame()
                        RemoveGrapplingHook(self);
                FireGrapplingHook();
                self.hook_state &= ~HOOK_FIRING;
+               self.hook_refire = max(self.hook_refire, time + autocvar_g_balance_grapplehook_refire * W_WeaponRateFactor());
        }
        else if(self.hook_state & HOOK_REMOVING)
        {