.float hook_time_hooked;
.float hook_time_fueldecrease;
-void W_Hook_SetAmmoCounter()
-{
- // this weapon doesn't have a reload system, so always set the clip to 0 when switching to it
- self.clip_load = self.clip_size = 0; // also keeps crosshair ammo from displaying
-}
-
void W_Hook_ExplodeThink (void)
{
float dt, dmg_remaining_next, f;
{
local entity gren;
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- self.ammo_cells = self.ammo_cells - autocvar_g_balance_hook_secondary_ammo;
+ W_DecreaseAmmo(ammo_cells, autocvar_g_balance_hook_secondary_ammo, FALSE);
W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", CHAN_WEAPON, autocvar_g_balance_hook_secondary_damage);
gren = spawn ();
if (time > self.hook_refire)
if (weapon_prepareattack(0, -1))
{
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
- self.ammo_fuel = self.ammo_fuel - autocvar_g_balance_hook_primary_fuel;
+ W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
self.hook_state |= HOOK_FIRING;
weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hook_primary_animtime, w_ready);
}
{
if ( self.ammo_fuel >= (time - self.hook_time_fueldecrease) * hooked_fuel )
{
- self.ammo_fuel -= (time - self.hook_time_fueldecrease) * hooked_fuel;
+ W_DecreaseAmmo(ammo_fuel, (time - self.hook_time_fueldecrease) * hooked_fuel, FALSE);
self.hook_time_fueldecrease = time;
// decrease next frame again
}
else if (req == WR_SETUP)
{
weapon_setup(WEP_HOOK);
- W_Hook_SetAmmoCounter();
+ self.current_ammo = ammo_fuel;
self.hook_state &~= HOOK_WAITING_FOR_RELEASE;
}
else if (req == WR_CHECKAMMO1)
{
self.hook_refire = time;
}
- else if (req == WR_SWITCHABLE)
- {
- // no reloading system, return true
- return TRUE;
- }
return TRUE;
};
#endif
precache_sound("weapons/hookbomb_impact.wav");
}
else if (req == WR_SUICIDEMESSAGE)
- w_deathtypestring = "%s did the impossible";
+ w_deathtypestring = _("%s did the impossible");
else if (req == WR_KILLMESSAGE)
- w_deathtypestring = "%s has run into %s's gravity bomb";
+ w_deathtypestring = _("%s has run into %s's gravity bomb");
return TRUE;
}
#endif