4 #include <common/effects/qc/_mod.qh>
6 void W_Electro_TriggerCombo(vector org, float rad, entity own)
8 entity e = WarpZone_FindRadius(org, rad, !WEP_CVAR(electro, combo_comboradius_thruwall));
11 if(e.classname == "electro_orb")
13 // check if the ball we are exploding is not owned by an
14 // independent player which is not the player who shot the ball
15 if(IS_INDEPENDENT_PLAYER(e.realowner) && own != e.realowner)
20 // do we allow thruwall triggering?
21 if(WEP_CVAR(electro, combo_comboradius_thruwall))
23 // if distance is greater than thruwall distance, check to make sure it's not through a wall
24 if(vdist(e.WarpZone_findradius_dist, >, WEP_CVAR(electro, combo_comboradius_thruwall)))
26 WarpZone_TraceLine(org, e.origin, MOVE_NOMONSTERS, e);
27 if(trace_fraction != 1)
29 // trigger is through a wall and outside of thruwall range, abort
36 // change owner to whoever caused the combo explosion
38 e.takedamage = DAMAGE_NO;
39 e.classname = "electro_orb_chain";
41 // now set the next one to trigger as well
42 setthink(e, W_Electro_ExplodeCombo);
44 // delay combo chains, looks cooler
46 if (WEP_CVAR(electro, combo_speed))
47 delay = vlen(e.WarpZone_findradius_dist) / WEP_CVAR(electro, combo_speed);
48 e.nextthink = time + delay;
54 void W_Electro_ExplodeComboThink(entity this)
56 float dt = time - this.teleport_time + this.dmg_interval;
57 float dmg_remaining_next = (bound(0, 1 - dt / this.dmg_duration, 1) ** this.dmg_power);
59 float f = this.dmg_last - dmg_remaining_next;
60 this.dmg_last = dmg_remaining_next;
62 float dmg_scale = ((this.dmg_linear) ? this.dmg_interval : f);
64 RadiusDamage(this, this.realowner, this.dmg * dmg_scale, this.dmg_edge * dmg_scale, this.dmg_radius, NULL, NULL, this.dmg_force * f, this.projectiledeathtype, this.weaponentity_fld, NULL);
65 this.projectiledeathtype |= HITTYPE_BOUNCE; // ensure it doesn't spam its effect
67 if(dt < this.dmg_duration)
68 this.nextthink = time + this.dmg_interval; // soon
73 void W_Electro_ExplodeCombo(entity this)
75 W_Electro_TriggerCombo(this.origin, WEP_CVAR(electro, combo_comboradius), this.realowner);
77 this.event_damage = func_null;
78 this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
80 if(WEP_CVAR(electro, combo_duration))
82 this.projectiledeathtype = WEP_ELECTRO.m_id | HITTYPE_SPLASH;
83 this.event_damage = func_null;
84 settouch(this, func_null);
85 this.effects |= EF_NODRAW;
87 setthink(this, W_Electro_ExplodeComboThink);
88 this.nextthink = time;
89 this.dmg = WEP_CVAR(electro, combo_damage);
90 this.dmg_edge = WEP_CVAR(electro, combo_edgedamage);
91 this.dmg_radius = WEP_CVAR(electro, combo_radius);
92 this.dmg_force = WEP_CVAR(electro, combo_force);
93 this.dmg_power = WEP_CVAR(electro, combo_power);
94 this.dmg_duration = WEP_CVAR(electro, combo_duration);
95 this.dmg_interval = WEP_CVAR(electro, combo_damage_interval);
96 this.dmg_linear = WEP_CVAR(electro, combo_damage_linear);
97 this.teleport_time = time;
99 set_movetype(this, MOVETYPE_NONE);
106 WEP_CVAR(electro, combo_damage),
107 WEP_CVAR(electro, combo_edgedamage),
108 WEP_CVAR(electro, combo_radius),
111 WEP_CVAR(electro, combo_force),
112 WEP_ELECTRO.m_id | HITTYPE_BOUNCE, // use THIS type for a combo because primary can't bounce
113 this.weaponentity_fld,
120 void W_Electro_Explode(entity this, entity directhitentity)
122 if(directhitentity.takedamage == DAMAGE_AIM)
123 if(IS_PLAYER(directhitentity))
124 if(DIFF_TEAM(this.realowner, directhitentity))
125 if(!IS_DEAD(directhitentity))
126 if(IsFlying(directhitentity))
127 Send_Notification(NOTIF_ONE, this.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH);
129 this.event_damage = func_null;
130 this.takedamage = DAMAGE_NO;
131 this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
133 if(this.move_movetype == MOVETYPE_BOUNCE || this.classname == "electro_orb") // TODO: classname is more reliable anyway?
138 WEP_CVAR_SEC(electro, damage),
139 WEP_CVAR_SEC(electro, edgedamage),
140 WEP_CVAR_SEC(electro, radius),
143 WEP_CVAR_SEC(electro, force),
144 this.projectiledeathtype,
145 this.weaponentity_fld,
151 W_Electro_TriggerCombo(this.origin, WEP_CVAR_PRI(electro, comboradius), this.realowner);
155 WEP_CVAR_PRI(electro, damage),
156 WEP_CVAR_PRI(electro, edgedamage),
157 WEP_CVAR_PRI(electro, radius),
160 WEP_CVAR_PRI(electro, force),
161 this.projectiledeathtype,
162 this.weaponentity_fld,
170 void W_Electro_Explode_use(entity this, entity actor, entity trigger)
172 W_Electro_Explode(this, trigger);
175 void W_Electro_TouchExplode(entity this, entity toucher)
177 PROJECTILE_TOUCH(this, toucher);
178 W_Electro_Explode(this, toucher);
182 //void sys_phys_update_single(entity this);
184 void W_Electro_Bolt_Think(entity this)
186 // sys_phys_update_single(this);
187 if(time >= this.ltime)
189 this.use(this, NULL, NULL);
193 if(WEP_CVAR_PRI(electro, midaircombo_radius))
196 entity e = WarpZone_FindRadius(this.origin, WEP_CVAR_PRI(electro, midaircombo_radius), true);
198 // loop through nearby orbs and trigger them
201 if(e.classname == "electro_orb")
203 // check if the ball we are exploding is not owned by an
204 // independent player which is not the player who shot the ball
205 if(IS_INDEPENDENT_PLAYER(e.realowner) && this.realowner != e.realowner)
211 if (this.owner == e.owner)
213 explode = WEP_CVAR_PRI(electro, midaircombo_own);
215 else if (SAME_TEAM(this.owner, e.owner))
217 explode = WEP_CVAR_PRI(electro, midaircombo_teammate);
221 explode = WEP_CVAR_PRI(electro, midaircombo_enemy);
226 // change owner to whoever caused the combo explosion
227 e.realowner = this.realowner;
228 e.takedamage = DAMAGE_NO;
229 e.classname = "electro_orb_chain";
231 // Only first orb explosion uses midaircombo_speed, others use the normal combo_speed.
232 // This allows to avoid the delay on the first explosion which looks better
233 // (the bolt and orb should explode together because they interacted together)
234 // while keeping the chaining delay.
235 setthink(e, W_Electro_ExplodeCombo);
237 if (WEP_CVAR_PRI(electro, midaircombo_speed))
238 delay = vlen(e.WarpZone_findradius_dist) / WEP_CVAR_PRI(electro, midaircombo_speed);
239 e.nextthink = time + delay;
247 // if we triggered an orb, should we explode? if not, lets try again next time
248 if(found && WEP_CVAR_PRI(electro, midaircombo_explode))
249 { this.use(this, NULL, NULL); }
251 { this.nextthink = min(time + WEP_CVAR_PRI(electro, midaircombo_interval), this.ltime); }
253 else { this.nextthink = this.ltime; }
254 // this.nextthink = time;
257 void W_Electro_Attack_Bolt(Weapon thiswep, entity actor, .entity weaponentity)
261 W_DecreaseAmmo(thiswep, actor, WEP_CVAR_PRI(electro, ammo), weaponentity);
263 W_SetupShot_ProjectileSize(
272 WEP_CVAR_PRI(electro, damage),
276 W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
278 proj = new(electro_bolt);
279 proj.owner = proj.realowner = actor;
280 proj.bot_dodge = true;
281 proj.bot_dodgerating = WEP_CVAR_PRI(electro, damage);
282 proj.use = W_Electro_Explode_use;
283 setthink(proj, W_Electro_Bolt_Think);
284 proj.nextthink = time;
285 proj.ltime = time + WEP_CVAR_PRI(electro, lifetime);
286 PROJECTILE_MAKETRIGGER(proj);
287 proj.projectiledeathtype = thiswep.m_id;
288 proj.weaponentity_fld = weaponentity;
289 setorigin(proj, w_shotorg);
292 set_movetype(proj, MOVETYPE_FLY);
293 W_SetupProjVelocity_PRI(proj, electro);
294 proj.angles = vectoangles(proj.velocity);
295 settouch(proj, W_Electro_TouchExplode);
296 setsize(proj, '0 0 -3', '0 0 -3');
297 proj.flags = FL_PROJECTILE;
298 IL_PUSH(g_projectiles, proj);
299 IL_PUSH(g_bot_dodge, proj);
300 proj.missile_flags = MIF_SPLASH;
302 CSQCProjectile(proj, true, PROJECTILE_ELECTRO_BEAM, true);
304 MUTATOR_CALLHOOK(EditProjectile, actor, proj);
305 // proj.com_phys_pos = proj.origin;
306 // proj.com_phys_vel = proj.velocity;
309 void W_Electro_Orb_Follow_Think(entity this)
311 if (time > this.death_time)
313 adaptor_think2use_hittype_splash(this);
316 if (this.move_movetype == MOVETYPE_FOLLOW)
318 int lost = LostMovetypeFollow(this);
321 // FIXME if player disconnected, it isn't possible to drop the orb at player's origin
322 // see comment in LostMovetypeFollow implementation
328 // drop the orb at the corpse's location
329 PROJECTILE_MAKETRIGGER(this);
330 set_movetype(this, MOVETYPE_TOSS);
332 setthink(this, adaptor_think2use_hittype_splash);
333 this.nextthink = this.death_time;
337 this.nextthink = time;
340 void W_Electro_Orb_Stick(entity this, entity to)
342 entity newproj = spawn();
343 newproj.classname = this.classname;
345 newproj.bot_dodge = this.bot_dodge;
346 newproj.bot_dodgerating = this.bot_dodgerating;
348 newproj.owner = this.owner;
349 newproj.realowner = this.realowner;
350 setorigin(newproj, this.origin);
351 setmodel(newproj, MDL_PROJECTILE_ELECTRO);
352 setsize(newproj, this.mins, this.maxs);
353 newproj.angles = vectoangles(-trace_plane_normal); // face against the surface
354 newproj.traileffectnum = _particleeffectnum(EFFECT_TR_NEXUIZPLASMA.eent_eff_name);
356 newproj.movedir = -trace_plane_normal;
358 newproj.takedamage = this.takedamage;
359 newproj.damageforcescale = this.damageforcescale;
360 SetResourceExplicit(newproj, RES_HEALTH, GetResource(this, RES_HEALTH));
361 newproj.event_damage = this.event_damage;
362 newproj.spawnshieldtime = this.spawnshieldtime;
363 newproj.damagedbycontents = true;
364 IL_PUSH(g_damagedbycontents, newproj);
366 set_movetype(newproj, MOVETYPE_NONE); // lock the orb in place
367 newproj.projectiledeathtype = this.projectiledeathtype;
368 newproj.weaponentity_fld = this.weaponentity_fld;
370 settouch(newproj, func_null);
371 if(WEP_CVAR_SEC(electro, stick_lifetime) > 0){
372 newproj.death_time = time + WEP_CVAR_SEC(electro, stick_lifetime);
374 newproj.death_time = this.death_time;
376 newproj.use = this.use;
377 newproj.flags = this.flags;
378 IL_PUSH(g_projectiles, newproj);
379 IL_PUSH(g_bot_dodge, newproj);
381 // check if limits are enabled (we can tell by checking if the original orb is listed) and push it to the list if so
382 if(LimitedElectroBallRubbleList && IL_CONTAINS(LimitedElectroBallRubbleList, this))
384 ReplaceOldListedChildRubble(LimitedElectroBallRubbleList, newproj, this);
391 SetMovetypeFollow(newproj, to);
393 setthink(newproj, W_Electro_Orb_Follow_Think);
394 newproj.nextthink = time;
398 setthink(newproj, adaptor_think2use_hittype_splash);
399 newproj.nextthink = newproj.death_time;
403 void W_Electro_Orb_Touch(entity this, entity toucher)
405 PROJECTILE_TOUCH(this, toucher);
406 if(toucher.takedamage == DAMAGE_AIM && WEP_CVAR_SEC(electro, touchexplode))
407 { W_Electro_Explode(this, toucher); }
408 else if(toucher.owner != this.owner && toucher.classname != this.classname) // don't stick to player's other projectiles!
410 //UpdateCSQCProjectile(this);
411 spamsound(this, CH_SHOTS, SND_ELECTRO_BOUNCE, VOL_BASE, ATTEN_NORM);
412 this.projectiledeathtype |= HITTYPE_BOUNCE;
414 if(WEP_CVAR_SEC(electro, stick)){
415 if(WEP_CVAR_SEC(electro, stick_lifetime) == 0){
416 W_Electro_Explode(this, toucher);
418 W_Electro_Orb_Stick(this, toucher);
424 void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
426 if(GetResource(this, RES_HEALTH) <= 0)
429 // note: combos are usually triggered by W_Electro_TriggerCombo, not damage
430 float is_combo = (inflictor.classname == "electro_orb_chain" || inflictor.classname == "electro_bolt");
432 if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, (is_combo ? 1 : -1)))
433 return; // g_projectiles_damage says to halt
435 TakeResource(this, RES_HEALTH, damage);
436 if(GetResource(this, RES_HEALTH) <= 0)
438 this.takedamage = DAMAGE_NO;
439 this.nextthink = time;
442 // change owner to whoever caused the combo explosion
443 this.realowner = inflictor.realowner;
444 this.classname = "electro_orb_chain";
445 setthink(this, W_Electro_ExplodeCombo);
446 // delay combo chains, looks cooler
447 // bound the length, inflictor may be in a galaxy far far away (warpzones)
448 float len = min(WEP_CVAR(electro, combo_radius), vlen(this.origin - inflictor.origin));
449 float delay = len / WEP_CVAR(electro, combo_speed);
450 this.nextthink = time + delay;
454 this.use = W_Electro_Explode_use;
455 setthink(this, adaptor_think2use); // not _hittype_splash, as this runs "immediately"
460 void W_Electro_Attack_Orb(Weapon thiswep, entity actor, .entity weaponentity)
462 W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(electro, ammo), weaponentity);
464 W_SetupShot_ProjectileSize(
473 WEP_CVAR_SEC(electro, damage),
474 thiswep.m_id | HITTYPE_SECONDARY
477 w_shotdir = v_forward; // no TrueAim for grenades please
479 W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir);
481 entity proj = new(electro_orb);
482 proj.owner = proj.realowner = actor;
483 proj.use = W_Electro_Explode_use;
484 setthink(proj, adaptor_think2use_hittype_splash);
485 proj.bot_dodge = true;
486 proj.bot_dodgerating = WEP_CVAR_SEC(electro, damage);
487 proj.nextthink = time + WEP_CVAR_SEC(electro, lifetime);
488 proj.death_time = time + WEP_CVAR_SEC(electro, lifetime);
489 PROJECTILE_MAKETRIGGER(proj);
490 proj.projectiledeathtype = thiswep.m_id | HITTYPE_SECONDARY;
491 proj.weaponentity_fld = weaponentity;
492 setorigin(proj, w_shotorg);
494 //proj.glow_size = 50;
495 //proj.glow_color = 45;
496 set_movetype(proj, MOVETYPE_BOUNCE);
497 W_SetupProjVelocity_UP_SEC(proj, electro);
498 settouch(proj, W_Electro_Orb_Touch);
499 setsize(proj, '-4 -4 -4', '4 4 4');
500 proj.takedamage = DAMAGE_YES;
501 proj.damageforcescale = WEP_CVAR_SEC(electro, damageforcescale);
502 SetResourceExplicit(proj, RES_HEALTH, WEP_CVAR_SEC(electro, health));
503 proj.event_damage = W_Electro_Orb_Damage;
504 proj.flags = FL_PROJECTILE;
505 IL_PUSH(g_projectiles, proj);
506 IL_PUSH(g_bot_dodge, proj);
507 proj.damagedbycontents = (WEP_CVAR_SEC(electro, damagedbycontents));
508 if(proj.damagedbycontents)
509 IL_PUSH(g_damagedbycontents, proj);
511 proj.bouncefactor = WEP_CVAR_SEC(electro, bouncefactor);
512 proj.bouncestop = WEP_CVAR_SEC(electro, bouncestop);
513 proj.missile_flags = MIF_SPLASH | MIF_ARC;
515 if(WEP_CVAR_SEC(electro, limit) > 0)
517 if (!LimitedElectroBallRubbleList)
518 LimitedElectroBallRubbleList = IL_NEW();
519 ListNewChildRubble(LimitedElectroBallRubbleList, proj);
520 LimitedChildrenRubble(LimitedElectroBallRubbleList, "electro_orb", WEP_CVAR_SEC(electro, limit), adaptor_think2use_hittype_splash, actor);
523 CSQCProjectile(proj, true, PROJECTILE_ELECTRO, false); // no culling, it has sound
525 MUTATOR_CALLHOOK(EditProjectile, actor, proj);
528 void W_Electro_CheckAttack(Weapon thiswep, entity actor, .entity weaponentity, int fire)
530 if(actor.(weaponentity).electro_count > 1)
531 if(PHYS_INPUT_BUTTON_ATCK2(actor))
532 if(weapon_prepareattack(thiswep, actor, weaponentity, true, -1))
534 W_Electro_Attack_Orb(thiswep, actor, weaponentity);
535 actor.(weaponentity).electro_count -= 1;
536 actor.(weaponentity).electro_secondarytime = time;
537 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
540 w_ready(thiswep, actor, weaponentity, fire);
543 .float bot_secondary_electromooth;
545 METHOD(Electro, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
547 PHYS_INPUT_BUTTON_ATCK(actor) = PHYS_INPUT_BUTTON_ATCK2(actor) = false;
548 if(vdist(actor.origin - actor.enemy.origin, >, 1000)) { actor.bot_secondary_electromooth = 0; }
549 if(actor.bot_secondary_electromooth == 0)
553 if(WEP_CVAR_PRI(electro, speed))
554 shoot = bot_aim(actor, weaponentity, WEP_CVAR_PRI(electro, speed), 0, WEP_CVAR_PRI(electro, lifetime), false, true);
556 shoot = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false, true);
560 PHYS_INPUT_BUTTON_ATCK(actor) = true;
561 if(random() < 0.01) actor.bot_secondary_electromooth = 1;
566 if(bot_aim(actor, weaponentity, WEP_CVAR_SEC(electro, speed), WEP_CVAR_SEC(electro, speed_up), WEP_CVAR_SEC(electro, lifetime), true, true))
568 PHYS_INPUT_BUTTON_ATCK2(actor) = true;
569 if(random() < 0.03) actor.bot_secondary_electromooth = 0;
573 METHOD(Electro, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
575 if(autocvar_g_balance_electro_reload_ammo) // forced reload // WEAPONTODO
577 float ammo_amount = 0;
578 if(actor.(weaponentity).clip_load >= WEP_CVAR_PRI(electro, ammo))
580 if(actor.(weaponentity).clip_load >= WEP_CVAR_SEC(electro, ammo))
585 thiswep.wr_reload(thiswep, actor, weaponentity);
592 if(time >= actor.(weaponentity).electro_secondarytime + WEP_CVAR_SEC(electro, refire2) * W_WeaponRateFactor(actor))
593 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire)))
595 W_Electro_Attack_Bolt(thiswep, actor, weaponentity);
596 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
601 if(time >= actor.(weaponentity).electro_secondarytime + WEP_CVAR_SEC(electro, refire) * W_WeaponRateFactor(actor))
602 if(weapon_prepareattack(thiswep, actor, weaponentity, true, -1))
604 W_Electro_Attack_Orb(thiswep, actor, weaponentity);
605 actor.(weaponentity).electro_count = WEP_CVAR_SEC(electro, count);
606 actor.(weaponentity).electro_secondarytime = time;
607 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
611 METHOD(Electro, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
613 float ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_PRI(electro, ammo);
614 ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_PRI(electro, ammo);
617 METHOD(Electro, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
620 if(WEP_CVAR(electro, combo_safeammocheck)) // true if you can fire at least one secondary blob AND one primary shot after it, otherwise false.
622 ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
623 ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_SEC(electro, ammo) + WEP_CVAR_PRI(electro, ammo);
627 ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(electro, ammo);
628 ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_SEC(electro, ammo);
632 METHOD(Electro, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
634 W_Reload(actor, weaponentity, min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), SND_RELOAD);
636 METHOD(Electro, wr_suicidemessage, Notification(entity thiswep))
638 if(w_deathtype & HITTYPE_SECONDARY)
639 return WEAPON_ELECTRO_SUICIDE_ORBS;
641 return WEAPON_ELECTRO_SUICIDE_BOLT;
643 METHOD(Electro, wr_killmessage, Notification(entity thiswep))
645 if(w_deathtype & HITTYPE_SECONDARY)
647 return WEAPON_ELECTRO_MURDER_ORBS;
651 if(w_deathtype & HITTYPE_BOUNCE)
652 return WEAPON_ELECTRO_MURDER_COMBO;
654 return WEAPON_ELECTRO_MURDER_BOLT;
661 METHOD(Electro, wr_impacteffect, void(entity thiswep, entity actor))
663 vector org2 = w_org + w_backoff * 2;
664 if(w_deathtype & HITTYPE_SECONDARY)
666 pointparticles(EFFECT_ELECTRO_BALLEXPLODE, org2, '0 0 0', 1);
668 sound(actor, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);
672 if(w_deathtype & HITTYPE_SPLASH)
674 org2 = w_org + w_backoff * 2;
675 if(particleeffectnum(EFFECT_ELECTRO_COMBO_LONG) >= 0)
676 pointparticles(EFFECT_ELECTRO_COMBO_LONG, org2, '0 0 0', 1);
678 pointparticles(EFFECT_ELECTRO_COMBO, org2, '0 0 0', 1);
680 sound(actor, CH_SHOTS, SND_ELECTRO_IMPACT_COMBO, VOL_BASE, ATTEN_NORM);
682 else if(w_deathtype & HITTYPE_BOUNCE)
684 // this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls
685 pointparticles(EFFECT_ELECTRO_COMBO, org2, '0 0 0', 1);
687 sound(actor, CH_SHOTS, SND_ELECTRO_IMPACT_COMBO, VOL_BASE, ATTEN_NORM);
691 pointparticles(EFFECT_ELECTRO_IMPACT, org2, '0 0 0', 1);
693 sound(actor, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);