2 REGISTER_WEAPON(CRYLINK, w_crylink, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "crylink", "crylink", _("Crylink"));
6 .float crylink_waitrelease;
7 .entity crylink_lastgroup;
14 void W_Crylink_SetAmmoCounter()
16 // set clip_load to the weapon we have switched to, if the gun uses reloading
17 if(!autocvar_g_balance_crylink_reload_ammo)
18 self.clip_load = 0; // also keeps crosshair ammo from displaying
21 self.clip_load = self.crylink_load;
22 self.clip_size = autocvar_g_balance_crylink_reload_ammo; // for the crosshair ammo display
26 void W_Crylink_ReloadedAndReady()
30 // now do the ammo transfer
31 self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
32 while(self.clip_load < autocvar_g_balance_crylink_reload_ammo && self.ammo_cells) // make sure we don't add more ammo than we have
37 self.crylink_load = self.clip_load;
39 t = ATTACK_FINISHED(self) - autocvar_g_balance_crylink_reload_time - 1;
40 ATTACK_FINISHED(self) = t;
44 void W_Crylink_Reload()
46 // return if reloading is disabled for this weapon
47 if(!autocvar_g_balance_crylink_reload_ammo)
50 if(!W_ReloadCheck(self.ammo_cells, min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo)))
55 sound (self, CHAN_WEAPON2, "weapons/reload.wav", VOL_BASE, ATTN_NORM);
57 t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_crylink_reload_time + 1;
58 ATTACK_FINISHED(self) = t;
60 weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_crylink_reload_time, W_Crylink_ReloadedAndReady);
62 self.old_clip_load = self.clip_load;
66 void W_Crylink_CheckLinks(entity e)
72 error("W_Crylink_CheckLinks: entity is world");
75 for(i = 0; i < 1000; ++i)
77 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
78 error("W_Crylink_CheckLinks: queue is inconsistent");
84 error("W_Crylink_CheckLinks: infinite chain");
87 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
89 if(me == own.crylink_lastgroup)
90 own.crylink_lastgroup = ((me == next) ? world : next);
91 prev.queuenext = next;
92 next.queueprev = prev;
95 void W_Crylink_Dequeue(entity e)
97 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
100 // force projectile to explode
101 void W_Crylink_LinkExplode (entity e, entity e2)
104 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
106 if(e == e.realowner.crylink_lastgroup)
107 e.realowner.crylink_lastgroup = world;
109 RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other);
111 if(e.queuenext != e2)
112 W_Crylink_LinkExplode(e.queuenext, e2);
117 // adjust towards center
118 // returns the origin where they will meet... and the time till the meeting is
119 // stored in w_crylink_linkjoin_time.
120 // could possibly network this origin and time, and display a special particle
121 // effect when projectiles meet there :P
122 // jspeed: MINIMUM jing speed
123 // jtime: MAXIMUM jing time (0: none)
124 float w_crylink_linkjoin_time;
125 vector W_Crylink_LinkJoin(entity e, float jspeed, float jtime)
127 vector avg_origin, avg_velocity;
132 // FIXME remove this debug code
133 W_Crylink_CheckLinks(e);
135 w_crylink_linkjoin_time = 0;
137 avg_origin = e.origin;
138 avg_velocity = e.velocity;
140 for(p = e; (p = p.queuenext) != e; )
142 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
143 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
146 avg_origin *= (1.0 / n);
147 avg_velocity *= (1.0 / n);
150 return avg_origin; // nothing to do
152 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
153 avg_dist = pow(vlen(e.origin - avg_origin), 2);
154 for(p = e; (p = p.queuenext) != e; )
155 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
156 avg_dist *= (1.0 / n);
157 avg_dist = sqrt(avg_dist);
160 return avg_origin; // no change needed
162 if(jspeed == 0 && jtime == 0)
164 e.velocity = avg_velocity;
165 UpdateCSQCProjectile(e);
166 for(p = e; (p = p.queuenext) != e; )
168 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
169 UpdateCSQCProjectile(p);
177 w_crylink_linkjoin_time = min(jtime, avg_dist / jspeed);
179 w_crylink_linkjoin_time = jtime;
182 w_crylink_linkjoin_time = avg_dist / jspeed;
183 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
185 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
186 UpdateCSQCProjectile(e);
187 for(p = e; (p = p.queuenext) != e; )
189 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
190 UpdateCSQCProjectile(p);
194 // jspeed -> +infinity:
195 // w_crylink_linkjoin_time -> +0
196 // targ_origin -> avg_origin
197 // p->velocity -> HUEG towards center
199 // w_crylink_linkjoin_time -> +/- infinity
200 // targ_origin -> avg_velocity * +/- infinity
201 // p->velocity -> avg_velocity
202 // jspeed -> -infinity:
203 // w_crylink_linkjoin_time -> -0
204 // targ_origin -> avg_origin
205 // p->velocity -> HUEG away from center
211 void W_Crylink_LinkJoinEffect_Think()
213 // is there at least 2 projectiles very close?
216 e = self.owner.crylink_lastgroup;
220 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
222 for(p = e; (p = p.queuenext) != e; )
224 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
229 if(e.projectiledeathtype & HITTYPE_SECONDARY)
231 if(autocvar_g_balance_crylink_secondary_joinexplode)
233 n = n / autocvar_g_balance_crylink_secondary_shots;
234 RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_joinexplode_damage * n,
235 autocvar_g_balance_crylink_secondary_joinexplode_edgedamage * n,
236 autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner,
237 autocvar_g_balance_crylink_secondary_joinexplode_force * n, e.projectiledeathtype, other);
239 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
244 if(autocvar_g_balance_crylink_primary_joinexplode)
246 n = n / autocvar_g_balance_crylink_primary_shots;
247 RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_joinexplode_damage * n,
248 autocvar_g_balance_crylink_primary_joinexplode_edgedamage * n,
249 autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner,
250 autocvar_g_balance_crylink_primary_joinexplode_force * n, e.projectiledeathtype, other);
252 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
261 // NO bounce protection, as bounces are limited!
262 void W_Crylink_Touch (void)
267 local entity savenext, saveprev, saveown;
268 saveown = self.realowner;
269 savenext = self.queuenext;
270 saveprev = self.queueprev;
271 if(WarpZone_Projectile_Touch())
274 W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
279 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
281 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
285 f = autocvar_g_balance_crylink_primary_bouncedamagefactor;
288 if (RadiusDamage (self, self.realowner, autocvar_g_balance_crylink_primary_damage * f, autocvar_g_balance_crylink_primary_edgedamage * f, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * f, self.projectiledeathtype, other) && autocvar_g_balance_crylink_primary_linkexplode)
290 if(self == self.realowner.crylink_lastgroup)
291 self.realowner.crylink_lastgroup = world;
292 W_Crylink_LinkExplode(self.queuenext, self);
299 W_Crylink_Dequeue(self);
303 self.cnt = self.cnt - 1;
304 self.angles = vectoangles(self.velocity);
306 self.projectiledeathtype |= HITTYPE_BOUNCE;
307 // commented out as it causes a little hitch...
309 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
312 void W_Crylink_Touch2 (void)
317 local entity savenext, saveprev, saveown;
318 savenext = self.queuenext;
319 saveprev = self.queueprev;
320 saveown = self.realowner;
321 if(WarpZone_Projectile_Touch())
324 W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
329 a = 1 - (time - self.fade_time) * self.fade_rate;
331 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
335 f = autocvar_g_balance_crylink_secondary_bouncedamagefactor;
338 if (RadiusDamage (self, self.realowner, autocvar_g_balance_crylink_secondary_damage * f, autocvar_g_balance_crylink_secondary_edgedamage * f, autocvar_g_balance_crylink_secondary_radius, world, autocvar_g_balance_crylink_secondary_force * f, self.projectiledeathtype, other) && autocvar_g_balance_crylink_secondary_linkexplode)
340 if(self == self.realowner.crylink_lastgroup)
341 self.realowner.crylink_lastgroup = world;
342 W_Crylink_LinkExplode(self.queuenext, self);
349 W_Crylink_Dequeue(self);
353 self.cnt = self.cnt - 1;
354 self.angles = vectoangles(self.velocity);
356 self.projectiledeathtype |= HITTYPE_BOUNCE;
357 // commented out as it causes a little hitch...
359 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
362 void W_Crylink_Fadethink (void)
364 W_Crylink_Dequeue(self);
368 void W_Crylink_Attack (void)
370 local float counter, shots;
371 local entity proj, prevproj, firstproj;
373 vector forward, right, up;
376 // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
377 if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
379 if(autocvar_g_balance_crylink_reload_ammo)
381 self.clip_load -= autocvar_g_balance_crylink_primary_ammo;
382 self.crylink_load = self.clip_load;
385 self.ammo_cells -= autocvar_g_balance_crylink_primary_ammo;
388 maxdmg = autocvar_g_balance_crylink_primary_damage*autocvar_g_balance_crylink_primary_shots;
389 maxdmg *= 1 + autocvar_g_balance_crylink_primary_bouncedamagefactor * autocvar_g_balance_crylink_primary_bounces;
390 if(autocvar_g_balance_crylink_primary_joinexplode)
391 maxdmg += autocvar_g_balance_crylink_primary_joinexplode_damage;
393 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CHAN_WEAPON, maxdmg);
398 shots = autocvar_g_balance_crylink_primary_shots;
399 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
401 while (counter < shots)
404 proj.realowner = proj.owner = self;
405 proj.classname = "spike";
406 proj.bot_dodge = TRUE;
407 proj.bot_dodgerating = autocvar_g_balance_crylink_primary_damage;
409 proj.queuenext = proj;
410 proj.queueprev = proj;
412 else if(counter == 0) { // first projectile, store in firstproj for now
415 else if(counter == shots - 1) { // last projectile, link up with first projectile
416 prevproj.queuenext = proj;
417 firstproj.queueprev = proj;
418 proj.queuenext = firstproj;
419 proj.queueprev = prevproj;
421 else { // else link up with previous projectile
422 prevproj.queuenext = proj;
423 proj.queueprev = prevproj;
428 proj.movetype = MOVETYPE_BOUNCEMISSILE;
429 PROJECTILE_MAKETRIGGER(proj);
430 proj.projectiledeathtype = WEP_CRYLINK;
431 //proj.gravity = 0.001;
433 setorigin (proj, w_shotorg);
434 setsize(proj, '0 0 0', '0 0 0');
442 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
446 s = s * autocvar_g_balance_crylink_primary_spread * g_weaponspreadfactor;
447 W_SetupProjectileVelocityEx(proj, w_shotdir + right * s_y + up * s_z, v_up, autocvar_g_balance_crylink_primary_speed, 0, 0, 0, FALSE);
448 proj.touch = W_Crylink_Touch;
450 proj.think = W_Crylink_Fadethink;
453 proj.fade_time = time + autocvar_g_balance_crylink_primary_middle_lifetime;
454 proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_middle_fadetime;
455 proj.nextthink = time + autocvar_g_balance_crylink_primary_middle_lifetime + autocvar_g_balance_crylink_primary_middle_fadetime;
459 proj.fade_time = time + autocvar_g_balance_crylink_primary_other_lifetime;
460 proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_other_fadetime;
461 proj.nextthink = time + autocvar_g_balance_crylink_primary_other_lifetime + autocvar_g_balance_crylink_primary_other_fadetime;
463 proj.teleport_time = time + autocvar_g_balance_crylink_primary_joindelay;
464 proj.cnt = autocvar_g_balance_crylink_primary_bounces;
465 //proj.scale = 1 + 1 * proj.cnt;
467 proj.angles = vectoangles (proj.velocity);
469 //proj.glow_size = 20;
471 proj.flags = FL_PROJECTILE;
473 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
475 other = proj; MUTATOR_CALLHOOK(EditProjectile);
477 counter = counter + 1;
479 self.crylink_lastgroup = proj;
482 void W_Crylink_Attack2 (void)
484 local float counter, shots;
485 local entity proj, prevproj, firstproj;
488 // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
489 if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
491 if(autocvar_g_balance_crylink_reload_ammo)
493 self.clip_load -= autocvar_g_balance_crylink_secondary_ammo;
494 self.crylink_load = self.clip_load;
497 self.ammo_cells -= autocvar_g_balance_crylink_secondary_ammo;
500 maxdmg = autocvar_g_balance_crylink_secondary_damage*autocvar_g_balance_crylink_secondary_shots;
501 maxdmg *= 1 + autocvar_g_balance_crylink_secondary_bouncedamagefactor * autocvar_g_balance_crylink_secondary_bounces;
502 if(autocvar_g_balance_crylink_secondary_joinexplode)
503 maxdmg += autocvar_g_balance_crylink_secondary_joinexplode_damage;
505 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CHAN_WEAPON, maxdmg);
507 shots = autocvar_g_balance_crylink_secondary_shots;
508 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
510 while (counter < shots)
513 proj.realowner = proj.owner = self;
514 proj.classname = "spike";
515 proj.bot_dodge = TRUE;
516 proj.bot_dodgerating = autocvar_g_balance_crylink_secondary_damage;
518 proj.queuenext = proj;
519 proj.queueprev = proj;
521 else if(counter == 0) { // first projectile, store in firstproj for now
524 else if(counter == shots - 1) { // last projectile, link up with first projectile
525 prevproj.queuenext = proj;
526 firstproj.queueprev = proj;
527 proj.queuenext = firstproj;
528 proj.queueprev = prevproj;
530 else { // else link up with previous projectile
531 prevproj.queuenext = proj;
532 proj.queueprev = prevproj;
537 proj.movetype = MOVETYPE_BOUNCEMISSILE;
538 PROJECTILE_MAKETRIGGER(proj);
539 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
540 //proj.gravity = 0.001;
542 setorigin (proj, w_shotorg);
543 setsize(proj, '0 0 0', '0 0 0');
545 W_SetupProjectileVelocityEx(proj, (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * autocvar_g_balance_crylink_secondary_spread * g_weaponspreadfactor), v_up, autocvar_g_balance_crylink_secondary_speed, 0, 0, 0, FALSE);
546 proj.touch = W_Crylink_Touch2;
547 proj.think = W_Crylink_Fadethink;
548 if(counter == (shots - 1) / 2)
550 proj.fade_time = time + autocvar_g_balance_crylink_secondary_middle_lifetime;
551 proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_middle_fadetime;
552 proj.nextthink = time + autocvar_g_balance_crylink_secondary_middle_lifetime + autocvar_g_balance_crylink_secondary_middle_fadetime;
556 proj.fade_time = time + autocvar_g_balance_crylink_secondary_line_lifetime;
557 proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_line_fadetime;
558 proj.nextthink = time + autocvar_g_balance_crylink_secondary_line_lifetime + autocvar_g_balance_crylink_secondary_line_fadetime;
560 proj.teleport_time = time + autocvar_g_balance_crylink_secondary_joindelay;
561 proj.cnt = autocvar_g_balance_crylink_secondary_bounces;
562 //proj.scale = 1 + 1 * proj.cnt;
564 proj.angles = vectoangles (proj.velocity);
566 //proj.glow_size = 20;
568 proj.flags = FL_PROJECTILE;
570 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
572 other = proj; MUTATOR_CALLHOOK(EditProjectile);
574 counter = counter + 1;
576 self.crylink_lastgroup = proj;
579 void spawnfunc_weapon_crylink (void)
581 weapon_defaultspawnfunc(WEP_CRYLINK);
584 float w_crylink(float req)
589 self.BUTTON_ATCK = bot_aim(autocvar_g_balance_crylink_primary_speed, 0, autocvar_g_balance_crylink_primary_middle_lifetime, FALSE);
591 self.BUTTON_ATCK2 = bot_aim(autocvar_g_balance_crylink_secondary_speed, 0, autocvar_g_balance_crylink_secondary_middle_lifetime, FALSE);
593 else if (req == WR_THINK)
595 if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo)) // forced reload
597 else if (self.BUTTON_ATCK)
599 if (!self.crylink_waitrelease)
600 if (weapon_prepareattack(0, autocvar_g_balance_crylink_primary_refire))
603 weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_crylink_primary_animtime, w_ready);
604 if(autocvar_g_balance_crylink_primary_joinspread != 0 || autocvar_g_balance_crylink_primary_jointime != 0)
605 self.crylink_waitrelease = 1;
608 else if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
610 if (!self.crylink_waitrelease)
611 if (weapon_prepareattack(1, autocvar_g_balance_crylink_secondary_refire))
614 weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_crylink_secondary_animtime, w_ready);
615 if(autocvar_g_balance_crylink_secondary_joinspread != 0 || autocvar_g_balance_crylink_secondary_jointime != 0)
616 self.crylink_waitrelease = 2;
621 if (self.crylink_waitrelease && (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time))
623 // fired and released now!
624 if(self.crylink_lastgroup)
627 entity linkjoineffect;
629 if(self.crylink_waitrelease == 1)
631 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_primary_joinspread * autocvar_g_balance_crylink_primary_speed, autocvar_g_balance_crylink_primary_jointime);
636 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_secondary_joinspread * autocvar_g_balance_crylink_secondary_speed, autocvar_g_balance_crylink_secondary_jointime);
639 linkjoineffect = spawn();
640 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
641 linkjoineffect.classname = "linkjoineffect";
642 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
643 linkjoineffect.owner = self;
644 setorigin(linkjoineffect, pos);
646 self.crylink_waitrelease = 0;
647 if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
650 self.cnt = WEP_CRYLINK;
651 self.switchweapon = w_getbestweapon(self);
657 if(self.switchweapon == self.weapon)
659 if(self.weaponentity.state == WS_READY)
661 self.wish_reload = 0;
667 else if (req == WR_PRECACHE)
669 precache_model ("models/weapons/g_crylink.md3");
670 precache_model ("models/weapons/v_crylink.md3");
671 precache_model ("models/weapons/h_crylink.iqm");
672 precache_sound ("weapons/crylink_fire.wav");
673 precache_sound ("weapons/crylink_fire2.wav");
674 precache_sound ("weapons/crylink_linkjoin.wav");
676 else if (req == WR_SETUP)
678 weapon_setup(WEP_CRYLINK);
679 W_Crylink_SetAmmoCounter();
681 else if (req == WR_CHECKAMMO1)
683 // don't "run out of ammo" and switch weapons while waiting for release
684 if(self.crylink_lastgroup && self.crylink_waitrelease)
687 if(autocvar_g_balance_crylink_reload_ammo)
688 return self.crylink_load >= autocvar_g_balance_crylink_primary_ammo;
690 return self.ammo_cells >= autocvar_g_balance_crylink_primary_ammo;
692 else if (req == WR_CHECKAMMO2)
694 // don't "run out of ammo" and switch weapons while waiting for release
695 if(self.crylink_lastgroup && self.crylink_waitrelease)
698 if(autocvar_g_balance_crylink_reload_ammo)
699 return self.crylink_load >= autocvar_g_balance_crylink_secondary_ammo;
701 return self.ammo_cells >= autocvar_g_balance_crylink_secondary_ammo;
707 float w_crylink(float req)
709 if(req == WR_IMPACTEFFECT)
712 org2 = w_org + w_backoff * 2;
713 if(w_deathtype & HITTYPE_SECONDARY)
715 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
717 sound(self, CHAN_PROJECTILE, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
721 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
723 sound(self, CHAN_PROJECTILE, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
726 else if(req == WR_PRECACHE)
728 precache_sound("weapons/crylink_impact2.wav");
729 precache_sound("weapons/crylink_impact.wav");
731 else if (req == WR_SUICIDEMESSAGE)
733 w_deathtypestring = "%s succeeded at self-destructing themself with the Crylink";
735 else if (req == WR_KILLMESSAGE)
737 if(w_deathtype & HITTYPE_BOUNCE)
738 w_deathtypestring = "%s could not hide from %s's Crylink"; // unchecked: SPLASH (SECONDARY can't be)
739 else if(w_deathtype & HITTYPE_SPLASH)
740 w_deathtypestring = "%s was too close to %s's Crylink"; // unchecked: SECONDARY
742 w_deathtypestring = "%s took a close look at %s's Crylink"; // unchecked: SECONDARY
744 else if (req == WR_RELOAD)