-REGISTER_WEAPON(HOOK, w_hook, IT_CELLS|IT_FUEL, 0, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, 0, "hookgun", "hook", _("Grappling Hook"))
+REGISTER_WEAPON(
+/* WEP_##id */ HOOK,
+/* function */ w_hook,
+/* ammotype */ IT_CELLS|IT_FUEL,
+/* impulse */ 0,
+/* flags */ WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH,
+/* rating */ 0,
+/* model */ "hookgun",
+/* shortname */ "hook",
+/* fullname */ _("Grappling Hook")
+);
if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
gren.think = adaptor_think2use_hittype_splash;
gren.use = W_Hook_Explode2;
gren.touch = W_Hook_Touch2;
gren.think = adaptor_think2use_hittype_splash;
gren.use = W_Hook_Explode2;
gren.touch = W_Hook_Touch2;
gren.takedamage = DAMAGE_YES;
gren.health = autocvar_g_balance_hook_secondary_health;
gren.damageforcescale = autocvar_g_balance_hook_secondary_damageforcescale;
gren.takedamage = DAMAGE_YES;
gren.health = autocvar_g_balance_hook_secondary_health;
gren.damageforcescale = autocvar_g_balance_hook_secondary_damageforcescale;
if (time > self.hook_refire)
if (weapon_prepareattack(0, -1))
{
W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
self.hook_state |= HOOK_FIRING;
if (time > self.hook_refire)
if (weapon_prepareattack(0, -1))
{
W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
self.hook_state |= HOOK_FIRING;
self.hook_refire = max(self.hook_refire, time + autocvar_g_balance_hook_primary_refire * W_WeaponRateFactor());
// hook also inhibits health regeneration, but only for 1 second
self.hook_refire = max(self.hook_refire, time + autocvar_g_balance_hook_primary_refire * W_WeaponRateFactor());
// hook also inhibits health regeneration, but only for 1 second
self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen);
}
if(self.hook && self.hook.state == 1)
{
self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen);
}
if(self.hook && self.hook.state == 1)
{
org2 = w_org + w_backoff * 2;
pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1);
if(!w_issilent)
org2 = w_org + w_backoff * 2;
pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/hookbomb_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, "weapons/hookbomb_impact.wav", VOL_BASE, ATTEN_NORM);