self.movetype = MOVETYPE_NONE;
}
+void W_Hook_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+{
+ if (self.health <= 0)
+ return;
+ self.health = self.health - damage;
+
+ print(strcat("hookbomb health ", ftos(self.health), " after ", ftos(damage), " damage... (at time: ", ftos(time), ")\n"));
+
+ if (self.health <= 0)
+ W_PrepareExplosionByDamage(attacker, W_Hook_Explode2);
+}
+
void W_Hook_Touch2 (void)
{
PROJECTILE_TOUCH;
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.event_damage = W_Hook_Damage;
+ gren.damagedbycontents = TRUE;
gren.velocity = '0 0 1' * autocvar_g_balance_hook_secondary_speed;
if(autocvar_g_projectiles_newton_style)