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;
12 // weapon load persistence, for weapons that support reloading
15 void W_Crylink_SetAmmoCounter()
17 // set clip_load to the weapon we have switched to, if the gun uses reloading
18 if(!autocvar_g_balance_crylink_reload_ammo)
19 self.clip_load = 0; // also keeps crosshair ammo from displaying
22 self.clip_load = self.crylink_load;
23 self.clip_size = autocvar_g_balance_crylink_reload_ammo; // for the crosshair ammo display
27 void W_Crylink_ReloadedAndReady()
31 // now do the ammo transfer
32 self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
33 while(self.clip_load < autocvar_g_balance_crylink_reload_ammo && self.ammo_cells) // make sure we don't add more ammo than we have
38 self.crylink_load = self.clip_load;
40 t = ATTACK_FINISHED(self) - autocvar_g_balance_crylink_reload_time - 1;
41 ATTACK_FINISHED(self) = t;
45 void W_Crylink_Reload()
47 // return if reloading is disabled for this weapon
48 if(!autocvar_g_balance_crylink_reload_ammo)
51 if(!W_ReloadCheck(self.ammo_cells, min(autocvar_g_balance_crylink_primary_ammo, autocvar_g_balance_crylink_secondary_ammo)))
56 sound (self, CHAN_WEAPON2, "weapons/reload.wav", VOL_BASE, ATTN_NORM);
58 t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_crylink_reload_time + 1;
59 ATTACK_FINISHED(self) = t;
61 weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_crylink_reload_time, W_Crylink_ReloadedAndReady);
63 self.old_clip_load = self.clip_load;
67 void W_Crylink_CheckLinks(entity e)
73 error("W_Crylink_CheckLinks: entity is world");
76 for(i = 0; i < 1000; ++i)
78 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
79 error("W_Crylink_CheckLinks: queue is inconsistent");
85 error("W_Crylink_CheckLinks: infinite chain");
88 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
90 if(me == own.crylink_lastgroup)
91 own.crylink_lastgroup = ((me == next) ? world : next);
92 prev.queuenext = next;
93 next.queueprev = prev;
96 void W_Crylink_Dequeue(entity e)
98 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
101 // force projectile to explode
102 void W_Crylink_LinkExplode (entity e, entity e2)
105 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
107 if(e == e.realowner.crylink_lastgroup)
108 e.realowner.crylink_lastgroup = world;
110 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);
112 if(e.queuenext != e2)
113 W_Crylink_LinkExplode(e.queuenext, e2);
118 // adjust towards center
119 // returns the origin where they will meet... and the time till the meeting is
120 // stored in w_crylink_linkjoin_time.
121 // could possibly network this origin and time, and display a special particle
122 // effect when projectiles meet there :P
123 // jspeed: MINIMUM jing speed
124 // jtime: MAXIMUM jing time (0: none)
125 float w_crylink_linkjoin_time;
126 vector W_Crylink_LinkJoin(entity e, float jspeed, float jtime)
128 vector avg_origin, avg_velocity;
133 // FIXME remove this debug code
134 W_Crylink_CheckLinks(e);
136 w_crylink_linkjoin_time = 0;
138 avg_origin = e.origin;
139 avg_velocity = e.velocity;
141 for(p = e; (p = p.queuenext) != e; )
143 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
144 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
147 avg_origin *= (1.0 / n);
148 avg_velocity *= (1.0 / n);
151 return avg_origin; // nothing to do
153 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
154 avg_dist = pow(vlen(e.origin - avg_origin), 2);
155 for(p = e; (p = p.queuenext) != e; )
156 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
157 avg_dist *= (1.0 / n);
158 avg_dist = sqrt(avg_dist);
161 return avg_origin; // no change needed
163 if(jspeed == 0 && jtime == 0)
165 e.velocity = avg_velocity;
166 UpdateCSQCProjectile(e);
167 for(p = e; (p = p.queuenext) != e; )
169 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
170 UpdateCSQCProjectile(p);
178 w_crylink_linkjoin_time = min(jtime, avg_dist / jspeed);
180 w_crylink_linkjoin_time = jtime;
183 w_crylink_linkjoin_time = avg_dist / jspeed;
184 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
186 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
187 UpdateCSQCProjectile(e);
188 for(p = e; (p = p.queuenext) != e; )
190 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
191 UpdateCSQCProjectile(p);
195 // jspeed -> +infinity:
196 // w_crylink_linkjoin_time -> +0
197 // targ_origin -> avg_origin
198 // p->velocity -> HUEG towards center
200 // w_crylink_linkjoin_time -> +/- infinity
201 // targ_origin -> avg_velocity * +/- infinity
202 // p->velocity -> avg_velocity
203 // jspeed -> -infinity:
204 // w_crylink_linkjoin_time -> -0
205 // targ_origin -> avg_origin
206 // p->velocity -> HUEG away from center
212 void W_Crylink_LinkJoinEffect_Think()
214 // is there at least 2 projectiles very close?
217 e = self.owner.crylink_lastgroup;
221 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
223 for(p = e; (p = p.queuenext) != e; )
225 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
230 if(e.projectiledeathtype & HITTYPE_SECONDARY)
232 if(autocvar_g_balance_crylink_secondary_joinexplode)
234 n = n / autocvar_g_balance_crylink_secondary_shots;
235 RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_secondary_joinexplode_damage * n,
236 autocvar_g_balance_crylink_secondary_joinexplode_edgedamage * n,
237 autocvar_g_balance_crylink_secondary_joinexplode_radius * n, e.realowner,
238 autocvar_g_balance_crylink_secondary_joinexplode_force * n, e.projectiledeathtype, other);
240 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
245 if(autocvar_g_balance_crylink_primary_joinexplode)
247 n = n / autocvar_g_balance_crylink_primary_shots;
248 RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_joinexplode_damage * n,
249 autocvar_g_balance_crylink_primary_joinexplode_edgedamage * n,
250 autocvar_g_balance_crylink_primary_joinexplode_radius * n, e.realowner,
251 autocvar_g_balance_crylink_primary_joinexplode_force * n, e.projectiledeathtype, other);
253 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
262 // NO bounce protection, as bounces are limited!
263 void W_Crylink_Touch (void)
268 local entity savenext, saveprev, saveown;
269 saveown = self.realowner;
270 savenext = self.queuenext;
271 saveprev = self.queueprev;
272 if(WarpZone_Projectile_Touch())
275 W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
280 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
282 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
286 f = autocvar_g_balance_crylink_primary_bouncedamagefactor;
289 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)
291 if(self == self.realowner.crylink_lastgroup)
292 self.realowner.crylink_lastgroup = world;
293 W_Crylink_LinkExplode(self.queuenext, self);
300 W_Crylink_Dequeue(self);
304 self.cnt = self.cnt - 1;
305 self.angles = vectoangles(self.velocity);
307 self.projectiledeathtype |= HITTYPE_BOUNCE;
308 // commented out as it causes a little hitch...
310 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
313 void W_Crylink_Touch2 (void)
318 local entity savenext, saveprev, saveown;
319 savenext = self.queuenext;
320 saveprev = self.queueprev;
321 saveown = self.realowner;
322 if(WarpZone_Projectile_Touch())
325 W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
330 a = 1 - (time - self.fade_time) * self.fade_rate;
332 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
336 f = autocvar_g_balance_crylink_secondary_bouncedamagefactor;
339 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)
341 if(self == self.realowner.crylink_lastgroup)
342 self.realowner.crylink_lastgroup = world;
343 W_Crylink_LinkExplode(self.queuenext, self);
350 W_Crylink_Dequeue(self);
354 self.cnt = self.cnt - 1;
355 self.angles = vectoangles(self.velocity);
357 self.projectiledeathtype |= HITTYPE_BOUNCE;
358 // commented out as it causes a little hitch...
360 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
363 void W_Crylink_Fadethink (void)
365 W_Crylink_Dequeue(self);
369 void W_Crylink_Attack (void)
371 local float counter, shots;
372 local entity proj, prevproj, firstproj;
374 vector forward, right, up;
377 // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
378 if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
380 if(autocvar_g_balance_crylink_reload_ammo)
382 self.clip_load -= autocvar_g_balance_crylink_primary_ammo;
383 self.crylink_load = self.clip_load;
386 self.ammo_cells -= autocvar_g_balance_crylink_primary_ammo;
389 maxdmg = autocvar_g_balance_crylink_primary_damage*autocvar_g_balance_crylink_primary_shots;
390 maxdmg *= 1 + autocvar_g_balance_crylink_primary_bouncedamagefactor * autocvar_g_balance_crylink_primary_bounces;
391 if(autocvar_g_balance_crylink_primary_joinexplode)
392 maxdmg += autocvar_g_balance_crylink_primary_joinexplode_damage;
394 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CHAN_WEAPON, maxdmg);
399 shots = autocvar_g_balance_crylink_primary_shots;
400 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
402 while (counter < shots)
405 proj.realowner = proj.owner = self;
406 proj.classname = "spike";
407 proj.bot_dodge = TRUE;
408 proj.bot_dodgerating = autocvar_g_balance_crylink_primary_damage;
410 proj.queuenext = proj;
411 proj.queueprev = proj;
413 else if(counter == 0) { // first projectile, store in firstproj for now
416 else if(counter == shots - 1) { // last projectile, link up with first projectile
417 prevproj.queuenext = proj;
418 firstproj.queueprev = proj;
419 proj.queuenext = firstproj;
420 proj.queueprev = prevproj;
422 else { // else link up with previous projectile
423 prevproj.queuenext = proj;
424 proj.queueprev = prevproj;
429 proj.movetype = MOVETYPE_BOUNCEMISSILE;
430 PROJECTILE_MAKETRIGGER(proj);
431 proj.projectiledeathtype = WEP_CRYLINK;
432 //proj.gravity = 0.001;
434 setorigin (proj, w_shotorg);
435 setsize(proj, '0 0 0', '0 0 0');
443 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
447 s = s * autocvar_g_balance_crylink_primary_spread * g_weaponspreadfactor;
448 W_SetupProjectileVelocityEx(proj, w_shotdir + right * s_y + up * s_z, v_up, autocvar_g_balance_crylink_primary_speed, 0, 0, 0, FALSE);
449 proj.touch = W_Crylink_Touch;
451 proj.think = W_Crylink_Fadethink;
454 proj.fade_time = time + autocvar_g_balance_crylink_primary_middle_lifetime;
455 proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_middle_fadetime;
456 proj.nextthink = time + autocvar_g_balance_crylink_primary_middle_lifetime + autocvar_g_balance_crylink_primary_middle_fadetime;
460 proj.fade_time = time + autocvar_g_balance_crylink_primary_other_lifetime;
461 proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_other_fadetime;
462 proj.nextthink = time + autocvar_g_balance_crylink_primary_other_lifetime + autocvar_g_balance_crylink_primary_other_fadetime;
464 proj.teleport_time = time + autocvar_g_balance_crylink_primary_joindelay;
465 proj.cnt = autocvar_g_balance_crylink_primary_bounces;
466 //proj.scale = 1 + 1 * proj.cnt;
468 proj.angles = vectoangles (proj.velocity);
470 //proj.glow_size = 20;
472 proj.flags = FL_PROJECTILE;
474 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
476 other = proj; MUTATOR_CALLHOOK(EditProjectile);
478 counter = counter + 1;
480 self.crylink_lastgroup = proj;
483 void W_Crylink_Attack2 (void)
485 local float counter, shots;
486 local entity proj, prevproj, firstproj;
489 // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
490 if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
492 if(autocvar_g_balance_crylink_reload_ammo)
494 self.clip_load -= autocvar_g_balance_crylink_secondary_ammo;
495 self.crylink_load = self.clip_load;
498 self.ammo_cells -= autocvar_g_balance_crylink_secondary_ammo;
501 maxdmg = autocvar_g_balance_crylink_secondary_damage*autocvar_g_balance_crylink_secondary_shots;
502 maxdmg *= 1 + autocvar_g_balance_crylink_secondary_bouncedamagefactor * autocvar_g_balance_crylink_secondary_bounces;
503 if(autocvar_g_balance_crylink_secondary_joinexplode)
504 maxdmg += autocvar_g_balance_crylink_secondary_joinexplode_damage;
506 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CHAN_WEAPON, maxdmg);
508 shots = autocvar_g_balance_crylink_secondary_shots;
509 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
511 while (counter < shots)
514 proj.realowner = proj.owner = self;
515 proj.classname = "spike";
516 proj.bot_dodge = TRUE;
517 proj.bot_dodgerating = autocvar_g_balance_crylink_secondary_damage;
519 proj.queuenext = proj;
520 proj.queueprev = proj;
522 else if(counter == 0) { // first projectile, store in firstproj for now
525 else if(counter == shots - 1) { // last projectile, link up with first projectile
526 prevproj.queuenext = proj;
527 firstproj.queueprev = proj;
528 proj.queuenext = firstproj;
529 proj.queueprev = prevproj;
531 else { // else link up with previous projectile
532 prevproj.queuenext = proj;
533 proj.queueprev = prevproj;
538 proj.movetype = MOVETYPE_BOUNCEMISSILE;
539 PROJECTILE_MAKETRIGGER(proj);
540 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
541 //proj.gravity = 0.001;
543 setorigin (proj, w_shotorg);
544 setsize(proj, '0 0 0', '0 0 0');
546 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);
547 proj.touch = W_Crylink_Touch2;
548 proj.think = W_Crylink_Fadethink;
549 if(counter == (shots - 1) / 2)
551 proj.fade_time = time + autocvar_g_balance_crylink_secondary_middle_lifetime;
552 proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_middle_fadetime;
553 proj.nextthink = time + autocvar_g_balance_crylink_secondary_middle_lifetime + autocvar_g_balance_crylink_secondary_middle_fadetime;
557 proj.fade_time = time + autocvar_g_balance_crylink_secondary_line_lifetime;
558 proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_line_fadetime;
559 proj.nextthink = time + autocvar_g_balance_crylink_secondary_line_lifetime + autocvar_g_balance_crylink_secondary_line_fadetime;
561 proj.teleport_time = time + autocvar_g_balance_crylink_secondary_joindelay;
562 proj.cnt = autocvar_g_balance_crylink_secondary_bounces;
563 //proj.scale = 1 + 1 * proj.cnt;
565 proj.angles = vectoangles (proj.velocity);
567 //proj.glow_size = 20;
569 proj.flags = FL_PROJECTILE;
571 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
573 other = proj; MUTATOR_CALLHOOK(EditProjectile);
575 counter = counter + 1;
577 self.crylink_lastgroup = proj;
580 void spawnfunc_weapon_crylink (void)
582 weapon_defaultspawnfunc(WEP_CRYLINK);
585 float w_crylink(float req)
591 self.BUTTON_ATCK = bot_aim(autocvar_g_balance_crylink_primary_speed, 0, autocvar_g_balance_crylink_primary_middle_lifetime, FALSE);
593 self.BUTTON_ATCK2 = bot_aim(autocvar_g_balance_crylink_secondary_speed, 0, autocvar_g_balance_crylink_secondary_middle_lifetime, FALSE);
595 else if (req == WR_THINK)
597 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
599 else if (self.BUTTON_ATCK)
601 if (!self.crylink_waitrelease)
602 if (weapon_prepareattack(0, autocvar_g_balance_crylink_primary_refire))
605 weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_crylink_primary_animtime, w_ready);
606 if(autocvar_g_balance_crylink_primary_joinspread != 0 || autocvar_g_balance_crylink_primary_jointime != 0)
607 self.crylink_waitrelease = 1;
610 else if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
612 if (!self.crylink_waitrelease)
613 if (weapon_prepareattack(1, autocvar_g_balance_crylink_secondary_refire))
616 weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_crylink_secondary_animtime, w_ready);
617 if(autocvar_g_balance_crylink_secondary_joinspread != 0 || autocvar_g_balance_crylink_secondary_jointime != 0)
618 self.crylink_waitrelease = 2;
623 if (self.crylink_waitrelease && (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time))
625 // fired and released now!
626 if(self.crylink_lastgroup)
629 entity linkjoineffect;
631 if(self.crylink_waitrelease == 1)
633 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);
638 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);
641 linkjoineffect = spawn();
642 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
643 linkjoineffect.classname = "linkjoineffect";
644 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
645 linkjoineffect.owner = self;
646 setorigin(linkjoineffect, pos);
648 self.crylink_waitrelease = 0;
649 if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
652 self.cnt = WEP_CRYLINK;
653 self.switchweapon = w_getbestweapon(self);
658 else if (req == WR_PRECACHE)
660 precache_model ("models/weapons/g_crylink.md3");
661 precache_model ("models/weapons/v_crylink.md3");
662 precache_model ("models/weapons/h_crylink.iqm");
663 precache_sound ("weapons/crylink_fire.wav");
664 precache_sound ("weapons/crylink_fire2.wav");
665 precache_sound ("weapons/crylink_linkjoin.wav");
666 precache_sound ("weapons/reload.wav");
668 else if (req == WR_SETUP)
670 weapon_setup(WEP_CRYLINK);
671 W_Crylink_SetAmmoCounter();
673 else if (req == WR_CHECKAMMO1)
675 // don't "run out of ammo" and switch weapons while waiting for release
676 if(self.crylink_lastgroup && self.crylink_waitrelease)
679 ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_primary_ammo;
680 ammo_amount += (autocvar_g_balance_crylink_reload_ammo && self.crylink_load >= autocvar_g_balance_crylink_primary_ammo);
683 else if (req == WR_CHECKAMMO2)
685 // don't "run out of ammo" and switch weapons while waiting for release
686 if(self.crylink_lastgroup && self.crylink_waitrelease)
689 ammo_amount = self.ammo_cells >= autocvar_g_balance_crylink_secondary_ammo;
690 ammo_amount += (autocvar_g_balance_crylink_reload_ammo && self.crylink_load >= autocvar_g_balance_crylink_secondary_ammo);
693 else if (req == WR_RESETPLAYER)
695 // all weapons must be fully loaded when we spawn
696 self.crylink_load = autocvar_g_balance_crylink_reload_ammo;
698 else if (req == WR_RELOAD)
706 float w_crylink(float req)
708 if(req == WR_IMPACTEFFECT)
711 org2 = w_org + w_backoff * 2;
712 if(w_deathtype & HITTYPE_SECONDARY)
714 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
716 sound(self, CHAN_PROJECTILE, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
720 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
722 sound(self, CHAN_PROJECTILE, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
725 else if(req == WR_PRECACHE)
727 precache_sound("weapons/crylink_impact2.wav");
728 precache_sound("weapons/crylink_impact.wav");
730 else if (req == WR_SUICIDEMESSAGE)
732 w_deathtypestring = "%s succeeded at self-destructing themself with the Crylink";
734 else if (req == WR_KILLMESSAGE)
736 if(w_deathtype & HITTYPE_BOUNCE)
737 w_deathtypestring = "%s could not hide from %s's Crylink"; // unchecked: SPLASH (SECONDARY can't be)
738 else if(w_deathtype & HITTYPE_SPLASH)
739 w_deathtypestring = "%s was too close to %s's Crylink"; // unchecked: SECONDARY
741 w_deathtypestring = "%s took a close look at %s's Crylink"; // unchecked: SECONDARY