- self.nextthink = min(time + WEP_CVAR_PRI(electro, midaircombo_interval), self.ltime);
- W_Plasma_TriggerCombo(self.origin, WEP_CVAR_PRI(electro, midaircombo_radius), self.realowner);
+ float found = 0;
+ entity e = WarpZone_FindRadius(self.origin, WEP_CVAR_PRI(electro, midaircombo_radius), TRUE);
+
+ // loop through nearby orbs and trigger them
+ while(e)
+ {
+ if(e.classname == "plasma")
+ {
+ // change owner to whoever caused the combo explosion
+ e.realowner = self.realowner;
+ e.takedamage = DAMAGE_NO;
+ e.classname = "plasma_chain";
+
+ // now set the next one to trigger as well
+ e.think = W_Plasma_Explode_Combo;
+
+ // delay combo chains, looks cooler
+ e.nextthink =
+ (
+ time
+ +
+ (WEP_CVAR(electro, combo_speed) ?
+ (vlen(e.WarpZone_findradius_dist) / WEP_CVAR(electro, combo_speed))
+ :
+ 0
+ )
+ );
+
+ ++found;
+ }
+ e = e.chain;
+ }
+
+ // if we triggered an orb, should we explode? if not, lets try again next time
+ if(found && WEP_CVAR_PRI(electro, midaircombo_explode))
+ { self.use(); }
+ else
+ { self.nextthink = min(time + WEP_CVAR_PRI(electro, midaircombo_interval), self.ltime); }