void W_Hagar_Explode (void)
{
- self.event_damage = SUB_Null;
+ self.event_damage = func_null;
RadiusDamage (self, self.realowner, autocvar_g_balance_hagar_primary_damage, autocvar_g_balance_hagar_primary_edgedamage, autocvar_g_balance_hagar_primary_radius, world, autocvar_g_balance_hagar_primary_force, self.projectiledeathtype, other);
remove (self);
void W_Hagar_Explode2 (void)
{
- self.event_damage = SUB_Null;
+ self.event_damage = func_null;
RadiusDamage (self, self.realowner, autocvar_g_balance_hagar_secondary_damage, autocvar_g_balance_hagar_secondary_edgedamage, autocvar_g_balance_hagar_secondary_radius, world, autocvar_g_balance_hagar_secondary_force, self.projectiledeathtype, other);
remove (self);
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
missile.angles = vectoangles (missile.velocity);
missile.flags = FL_PROJECTILE;
+ missile.missile_flags = MIF_SPLASH;
CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
missile.angles = vectoangles (missile.velocity);
missile.flags = FL_PROJECTILE;
+ missile.missile_flags = MIF_SPLASH;
CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR_BOUNCING, TRUE);
shots = self.hagar_load;
missile = world;
- while (counter < shots)
+ for(counter = 0; counter < shots; ++counter)
{
missile = spawn ();
missile.owner = missile.realowner = self;
setorigin (missile, w_shotorg);
setsize(missile, '0 0 0', '0 0 0');
missile.movetype = MOVETYPE_FLY;
+ missile.missile_flags = MIF_SPLASH;
// per-shot spread calculation: the more shots there are, the less spread is applied (based on the bias cvar)
spread_pershot = ((shots - 1) / (autocvar_g_balance_hagar_secondary_load_max - 1));
CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
other = missile; MUTATOR_CALLHOOK(EditProjectile);
-
- counter = counter + 1;
}
weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_hagar_secondary_load_animtime, w_ready);
else if (req == WR_THINK)
{
float loadable_secondary;
- loadable_secondary = autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary;
+ loadable_secondary = (autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary);
if (loadable_secondary)
W_Hagar_Attack2_Load(); // must always run each frame