+ missile = spawn ();
+ missile.owner = missile.realowner = self;
+ missile.classname = "missile";
+ missile.bot_dodge = TRUE;
+ missile.bot_dodgerating = autocvar_g_balance_hagar_secondary_damage;
+
+ missile.takedamage = DAMAGE_YES;
+ missile.health = autocvar_g_balance_hagar_secondary_health;
+ missile.damageforcescale = autocvar_g_balance_hagar_secondary_damageforcescale;
+ missile.event_damage = W_Hagar_Damage;
+ missile.damagedbycontents = TRUE;
+
+ missile.touch = W_Hagar_Touch; // not bouncy
+ missile.use = W_Hagar_Explode2;
+ missile.think = adaptor_think2use_hittype_splash;
+ missile.nextthink = time + autocvar_g_balance_hagar_secondary_lifetime_min + random() * autocvar_g_balance_hagar_secondary_lifetime_rand;
+ PROJECTILE_MAKETRIGGER(missile);
+ missile.projectiledeathtype = WEP_HAGAR | HITTYPE_SECONDARY;
+ setorigin (missile, w_shotorg);
+ setsize(missile, '0 0 0', '0 0 0');
+ missile.movetype = MOVETYPE_FLY;
+
+ // 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));
+ spread_pershot = (1 - (spread_pershot * autocvar_g_balance_hagar_secondary_load_spread_bias));
+ spread_pershot = (autocvar_g_balance_hagar_secondary_spread * spread_pershot * g_weaponspreadfactor);
+
+ // pattern spread calculation
+ s = '0 0 0';
+ if (counter == 0)
+ s = '0 0 0';
+ else