if (self.health <= 0)
return;
- float is_linkexplode = ((inflictor.realowner == self.realowner)
+ float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : TRUE)
&& (inflictor.projectiledeathtype & HITTYPE_SECONDARY)
&& (self.projectiledeathtype & HITTYPE_SECONDARY));
is_linkexplode = (is_linkexplode && autocvar_g_balance_hagar_secondary_load_linkexplode);
else
is_linkexplode = -1; // not secondary load, so continue as normal without exception.
-
+
if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, is_linkexplode))
return; // g_projectiles_damage says to halt
void W_Hagar_Attack (void)
{
- local entity missile;
+ entity missile;
W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_reload_ammo);
void W_Hagar_Attack2 (void)
{
- local entity missile;
+ entity missile;
W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo, autocvar_g_balance_hagar_reload_ammo);
{
// time to release the rockets we've loaded
- local entity missile;
- local float counter, shots, spread_pershot;
- local vector s;
+ entity missile;
+ float counter, shots, spread_pershot;
+ vector s;
vector forward, right, up;
if(!self.hagar_load)
{
// loadable hagar secondary attack, must always run each frame
- local float loaded, enough_ammo;
+ float loaded, enough_ammo;
loaded = self.hagar_load >= autocvar_g_balance_hagar_secondary_load_max;
// this is different than WR_CHECKAMMO when it comes to reloading
}
else if (req == WR_THINK)
{
- local float loadable_secondary;
+ float loadable_secondary;
loadable_secondary = autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary;
if (loadable_secondary)
W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");
}
return TRUE;
-};
+}
#endif
#ifdef CSQC
float w_hagar(float req)
precache_sound("weapons/hagexp3.wav");
}
else if (req == WR_SUICIDEMESSAGE)
- w_deathtypestring = _("%s played with tiny rockets");
+ w_deathtypestring = _("%s played with tiny hagar rockets");
else if (req == WR_KILLMESSAGE)
{
if(w_deathtype & HITTYPE_BOUNCE) // must be secondary; unchecked: SPLASH
- w_deathtypestring = _("%s hoped %s's missiles wouldn't bounce");
+ w_deathtypestring = _("%s was pummeled with a burst of hagar rockets by %s");
else // unchecked: SPLASH, SECONDARY
- w_deathtypestring = _("%s was pummeled by %s");
+ w_deathtypestring = _("%s was pummeled with hagar rockets by %s");
}
return TRUE;
}