3 /* WEP_##id */ CRYLINK,
4 /* function */ W_Crylink,
5 /* ammotype */ ammo_cells,
7 /* flags */ WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH,
8 /* rating */ BOT_PICKUP_RATING_MID,
10 /* modelname */ "crylink",
11 /* simplemdl */ "foobar",
12 /* crosshair */ "gfx/crosshaircrylink 0.4",
13 /* refname */ "crylink",
14 /* wepname */ _("Crylink")
17 #define CRYLINK_SETTINGS(w_cvar,w_prop) CRYLINK_SETTINGS_LIST(w_cvar, w_prop, CRYLINK, crylink)
18 #define CRYLINK_SETTINGS_LIST(w_cvar,w_prop,id,sn) \
19 w_cvar(id, sn, BOTH, ammo) \
20 w_cvar(id, sn, BOTH, animtime) \
21 w_cvar(id, sn, BOTH, damage) \
22 w_cvar(id, sn, BOTH, edgedamage) \
23 w_cvar(id, sn, BOTH, radius) \
24 w_cvar(id, sn, BOTH, force) \
25 w_cvar(id, sn, BOTH, spread) \
26 w_cvar(id, sn, BOTH, refire) \
27 w_cvar(id, sn, BOTH, speed) \
28 w_cvar(id, sn, BOTH, shots) \
29 w_cvar(id, sn, BOTH, bounces) \
30 w_cvar(id, sn, BOTH, bouncedamagefactor) \
31 w_cvar(id, sn, BOTH, middle_lifetime) \
32 w_cvar(id, sn, BOTH, middle_fadetime) \
33 w_cvar(id, sn, BOTH, other_lifetime) \
34 w_cvar(id, sn, BOTH, other_fadetime) \
35 w_cvar(id, sn, BOTH, linkexplode) \
36 w_cvar(id, sn, BOTH, joindelay) \
37 w_cvar(id, sn, BOTH, joinspread) \
38 w_cvar(id, sn, BOTH, joinexplode) \
39 w_cvar(id, sn, BOTH, joinexplode_damage) \
40 w_cvar(id, sn, BOTH, joinexplode_edgedamage) \
41 w_cvar(id, sn, BOTH, joinexplode_radius) \
42 w_cvar(id, sn, BOTH, joinexplode_force) \
43 w_cvar(id, sn, SEC, spreadtype) \
44 w_cvar(id, sn, NONE, secondary) \
45 w_prop(id, sn, float, reloading_ammo, reload_ammo) \
46 w_prop(id, sn, float, reloading_time, reload_time) \
47 w_prop(id, sn, float, switchdelay_raise, switchdelay_raise) \
48 w_prop(id, sn, float, switchdelay_drop, switchdelay_drop) \
49 w_prop(id, sn, string, weaponreplace, weaponreplace) \
50 w_prop(id, sn, float, weaponstart, weaponstart) \
51 w_prop(id, sn, float, weaponstartoverride, weaponstartoverride)
54 CRYLINK_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
56 .float crylink_waitrelease;
57 .entity crylink_lastgroup;
64 void spawnfunc_weapon_crylink() { weapon_defaultspawnfunc(WEP_CRYLINK); }
66 void W_Crylink_CheckLinks(entity e)
72 error("W_Crylink_CheckLinks: entity is world");
73 if(e.classname != "spike" || wasfreed(e))
74 error(sprintf("W_Crylink_CheckLinks: entity is not a spike but a %s (freed: %d)", e.classname, wasfreed(e)));
77 for(i = 0; i < 1000; ++i)
79 if(p.queuenext.queueprev != p || p.queueprev.queuenext != p)
80 error("W_Crylink_CheckLinks: queue is inconsistent");
86 error("W_Crylink_CheckLinks: infinite chain");
89 void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
91 W_Crylink_CheckLinks(next);
92 if(me == own.crylink_lastgroup)
93 own.crylink_lastgroup = ((me == next) ? world : next);
94 prev.queuenext = next;
95 next.queueprev = prev;
96 me.classname = "spike_oktoremove";
98 W_Crylink_CheckLinks(next);
101 void W_Crylink_Dequeue(entity e)
103 W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
106 void W_Crylink_Reset(void)
108 W_Crylink_Dequeue(self);
112 // force projectile to explode
113 void W_Crylink_LinkExplode (entity e, entity e2)
120 a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
122 if(e == e.realowner.crylink_lastgroup)
123 e.realowner.crylink_lastgroup = world;
125 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
127 RadiusDamage(e, e.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * a, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * a, WEP_CVAR_BOTH(crylink, isprimary, radius), world, world, WEP_CVAR_BOTH(crylink, isprimary, force) * a, e.projectiledeathtype, other);
129 W_Crylink_LinkExplode(e.queuenext, e2);
131 e.classname = "spike_oktoremove";
135 // adjust towards center
136 // returns the origin where they will meet... and the time till the meeting is
137 // stored in w_crylink_linkjoin_time.
138 // could possibly network this origin and time, and display a special particle
139 // effect when projectiles meet there :P
140 // jspeed: joining speed (calculate this as join spread * initial speed)
141 float w_crylink_linkjoin_time;
142 vector W_Crylink_LinkJoin(entity e, float jspeed)
144 vector avg_origin, avg_velocity;
149 // FIXME remove this debug code
150 W_Crylink_CheckLinks(e);
152 w_crylink_linkjoin_time = 0;
154 avg_origin = e.origin;
155 avg_velocity = e.velocity;
157 for(p = e; (p = p.queuenext) != e; )
159 avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
160 avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
163 avg_origin *= (1.0 / n);
164 avg_velocity *= (1.0 / n);
167 return avg_origin; // nothing to do
169 // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
170 avg_dist = pow(vlen(e.origin - avg_origin), 2);
171 for(p = e; (p = p.queuenext) != e; )
172 avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
173 avg_dist *= (1.0 / n);
174 avg_dist = sqrt(avg_dist);
177 return avg_origin; // no change needed
181 e.velocity = avg_velocity;
182 UpdateCSQCProjectile(e);
183 for(p = e; (p = p.queuenext) != e; )
185 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
186 UpdateCSQCProjectile(p);
188 targ_origin = avg_origin + 1000000000 * normalize(avg_velocity); // HUUUUUUGE
192 w_crylink_linkjoin_time = avg_dist / jspeed;
193 targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
195 e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
196 UpdateCSQCProjectile(e);
197 for(p = e; (p = p.queuenext) != e; )
199 p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
200 UpdateCSQCProjectile(p);
204 // jspeed -> +infinity:
205 // w_crylink_linkjoin_time -> +0
206 // targ_origin -> avg_origin
207 // p->velocity -> HUEG towards center
209 // w_crylink_linkjoin_time -> +/- infinity
210 // targ_origin -> avg_velocity * +/- infinity
211 // p->velocity -> avg_velocity
212 // jspeed -> -infinity:
213 // w_crylink_linkjoin_time -> -0
214 // targ_origin -> avg_origin
215 // p->velocity -> HUEG away from center
218 W_Crylink_CheckLinks(e);
223 void W_Crylink_LinkJoinEffect_Think()
225 // is there at least 2 projectiles very close?
228 e = self.owner.crylink_lastgroup;
232 if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
234 for(p = e; (p = p.queuenext) != e; )
236 if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
241 float isprimary = !(e.projectiledeathtype & HITTYPE_SECONDARY);
243 if(WEP_CVAR_BOTH(crylink, isprimary, joinexplode))
245 n /= WEP_CVAR_BOTH(crylink, isprimary, shots);
249 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_damage) * n,
250 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_edgedamage) * n,
251 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_radius) * n,
254 WEP_CVAR_BOTH(crylink, isprimary, joinexplode_force) * n,
255 e.projectiledeathtype,
258 pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
265 float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad)
267 entity head = WarpZone_FindRadius((projectile.origin + (projectile.mins + projectile.maxs) * 0.5), rad + MAX_DAMAGEEXTRARADIUS, FALSE);
268 float hit_friendly = 0;
273 if((head.takedamage != DAMAGE_NO) && (head.deadflag == DEAD_NO))
275 if(SAME_TEAM(head, projectile.realowner))
284 return (hit_enemy ? FALSE : hit_friendly);
287 // NO bounce protection, as bounces are limited!
288 void W_Crylink_Touch (void)
292 float isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
296 a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
298 finalhit = ((self.cnt <= 0) || (other.takedamage != DAMAGE_NO));
302 f = WEP_CVAR_BOTH(crylink, isprimary, bouncedamagefactor);
306 float totaldamage = RadiusDamage(self, self.realowner, WEP_CVAR_BOTH(crylink, isprimary, damage) * f, WEP_CVAR_BOTH(crylink, isprimary, edgedamage) * f, WEP_CVAR_BOTH(crylink, isprimary, radius), world, world, WEP_CVAR_BOTH(crylink, isprimary, force) * f, self.projectiledeathtype, other);
308 if(totaldamage && ((WEP_CVAR_BOTH(crylink, isprimary, linkexplode) == 2) || ((WEP_CVAR_BOTH(crylink, isprimary, linkexplode) == 1) && !W_Crylink_Touch_WouldHitFriendly(self, WEP_CVAR_BOTH(crylink, isprimary, radius)))))
310 if(self == self.realowner.crylink_lastgroup)
311 self.realowner.crylink_lastgroup = world;
312 W_Crylink_LinkExplode(self.queuenext, self);
313 self.classname = "spike_oktoremove";
320 W_Crylink_Dequeue(self);
324 self.cnt = self.cnt - 1;
325 self.angles = vectoangles(self.velocity);
327 self.projectiledeathtype |= HITTYPE_BOUNCE;
328 // commented out as it causes a little hitch...
330 // CSQCProjectile(proj, TRUE, PROJECTILE_CRYLINK, TRUE);
333 void W_Crylink_Fadethink (void)
335 W_Crylink_Dequeue(self);
339 void W_Crylink_Attack (void)
341 float counter, shots;
342 entity proj, prevproj, firstproj;
344 vector forward, right, up;
347 W_DecreaseAmmo(WEP_CVAR_PRI(crylink, ammo));
349 maxdmg = WEP_CVAR_PRI(crylink, damage) * WEP_CVAR_PRI(crylink, shots);
350 maxdmg *= 1 + WEP_CVAR_PRI(crylink, bouncedamagefactor) * WEP_CVAR_PRI(crylink, bounces);
351 if(WEP_CVAR_PRI(crylink, joinexplode))
352 maxdmg += WEP_CVAR_PRI(crylink, joinexplode_damage);
354 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CH_WEAPON_A, maxdmg);
359 shots = WEP_CVAR_PRI(crylink, shots);
360 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
361 proj = prevproj = firstproj = world;
362 for(counter = 0; counter < shots; ++counter)
365 proj.reset = W_Crylink_Reset;
366 proj.realowner = proj.owner = self;
367 proj.classname = "spike";
368 proj.bot_dodge = TRUE;
369 proj.bot_dodgerating = WEP_CVAR_PRI(crylink, damage);
371 proj.queuenext = proj;
372 proj.queueprev = proj;
374 else if(counter == 0) { // first projectile, store in firstproj for now
377 else if(counter == shots - 1) { // last projectile, link up with first projectile
378 prevproj.queuenext = proj;
379 firstproj.queueprev = proj;
380 proj.queuenext = firstproj;
381 proj.queueprev = prevproj;
383 else { // else link up with previous projectile
384 prevproj.queuenext = proj;
385 proj.queueprev = prevproj;
390 proj.movetype = MOVETYPE_BOUNCEMISSILE;
391 PROJECTILE_MAKETRIGGER(proj);
392 proj.projectiledeathtype = WEP_CRYLINK;
393 //proj.gravity = 0.001;
395 setorigin (proj, w_shotorg);
396 setsize(proj, '0 0 0', '0 0 0');
404 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
408 s = s * WEP_CVAR_PRI(crylink, spread) * g_weaponspreadfactor;
409 W_SetupProjVelocity_Explicit(proj, w_shotdir + right * s_y + up * s_z, v_up, WEP_CVAR_PRI(crylink, speed), 0, 0, 0, FALSE);
410 proj.touch = W_Crylink_Touch;
412 proj.think = W_Crylink_Fadethink;
415 proj.fade_time = time + WEP_CVAR_PRI(crylink, middle_lifetime);
416 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, middle_fadetime);
417 proj.nextthink = time + WEP_CVAR_PRI(crylink, middle_lifetime) + WEP_CVAR_PRI(crylink, middle_fadetime);
421 proj.fade_time = time + WEP_CVAR_PRI(crylink, other_lifetime);
422 proj.fade_rate = 1 / WEP_CVAR_PRI(crylink, other_fadetime);
423 proj.nextthink = time + WEP_CVAR_PRI(crylink, other_lifetime) + WEP_CVAR_PRI(crylink, other_fadetime);
425 proj.teleport_time = time + WEP_CVAR_PRI(crylink, joindelay);
426 proj.cnt = WEP_CVAR_PRI(crylink, bounces);
427 //proj.scale = 1 + 1 * proj.cnt;
429 proj.angles = vectoangles (proj.velocity);
431 //proj.glow_size = 20;
433 proj.flags = FL_PROJECTILE;
434 proj.missile_flags = MIF_SPLASH;
436 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
438 other = proj; MUTATOR_CALLHOOK(EditProjectile);
440 if(WEP_CVAR_PRI(crylink, joinspread) != 0)
442 self.crylink_lastgroup = proj;
443 W_Crylink_CheckLinks(proj);
444 self.crylink_waitrelease = 1;
448 void W_Crylink_Attack2 (void)
450 float counter, shots;
451 entity proj, prevproj, firstproj;
453 vector forward, right, up;
456 W_DecreaseAmmo(WEP_CVAR_SEC(crylink, ammo));
458 maxdmg = WEP_CVAR_SEC(crylink, damage) * WEP_CVAR_SEC(crylink, shots);
459 maxdmg *= 1 + WEP_CVAR_SEC(crylink, bouncedamagefactor) * WEP_CVAR_SEC(crylink, bounces);
460 if(WEP_CVAR_SEC(crylink, joinexplode))
461 maxdmg += WEP_CVAR_SEC(crylink, joinexplode_damage);
463 W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CH_WEAPON_A, maxdmg);
468 shots = WEP_CVAR_SEC(crylink, shots);
469 pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
470 proj = prevproj = firstproj = world;
471 for(counter = 0; counter < shots; ++counter)
474 proj.reset = W_Crylink_Reset;
475 proj.realowner = proj.owner = self;
476 proj.classname = "spike";
477 proj.bot_dodge = TRUE;
478 proj.bot_dodgerating = WEP_CVAR_SEC(crylink, damage);
480 proj.queuenext = proj;
481 proj.queueprev = proj;
483 else if(counter == 0) { // first projectile, store in firstproj for now
486 else if(counter == shots - 1) { // last projectile, link up with first projectile
487 prevproj.queuenext = proj;
488 firstproj.queueprev = proj;
489 proj.queuenext = firstproj;
490 proj.queueprev = prevproj;
492 else { // else link up with previous projectile
493 prevproj.queuenext = proj;
494 proj.queueprev = prevproj;
499 proj.movetype = MOVETYPE_BOUNCEMISSILE;
500 PROJECTILE_MAKETRIGGER(proj);
501 proj.projectiledeathtype = WEP_CRYLINK | HITTYPE_SECONDARY;
502 //proj.gravity = 0.001;
504 setorigin (proj, w_shotorg);
505 setsize(proj, '0 0 0', '0 0 0');
507 if(WEP_CVAR_SEC(crylink, spreadtype) == 1)
514 makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
518 s = s * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor;
519 s = w_shotdir + right * s_y + up * s_z;
523 s = (w_shotdir + (((counter + 0.5) / shots) * 2 - 1) * v_right * WEP_CVAR_SEC(crylink, spread) * g_weaponspreadfactor);
526 W_SetupProjVelocity_Explicit(proj, s, v_up, WEP_CVAR_SEC(crylink, speed), 0, 0, 0, FALSE);
527 proj.touch = W_Crylink_Touch;
528 proj.think = W_Crylink_Fadethink;
529 if(counter == (shots - 1) / 2)
531 proj.fade_time = time + WEP_CVAR_SEC(crylink, middle_lifetime);
532 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, middle_fadetime);
533 proj.nextthink = time + WEP_CVAR_SEC(crylink, middle_lifetime) + WEP_CVAR_SEC(crylink, middle_fadetime);
537 proj.fade_time = time + WEP_CVAR_SEC(crylink, other_lifetime);
538 proj.fade_rate = 1 / WEP_CVAR_SEC(crylink, other_fadetime);
539 proj.nextthink = time + WEP_CVAR_SEC(crylink, other_lifetime) + WEP_CVAR_SEC(crylink, other_fadetime);
541 proj.teleport_time = time + WEP_CVAR_SEC(crylink, joindelay);
542 proj.cnt = WEP_CVAR_SEC(crylink, bounces);
543 //proj.scale = 1 + 1 * proj.cnt;
545 proj.angles = vectoangles (proj.velocity);
547 //proj.glow_size = 20;
549 proj.flags = FL_PROJECTILE;
550 proj.missile_flags = MIF_SPLASH;
552 CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
554 other = proj; MUTATOR_CALLHOOK(EditProjectile);
556 if(WEP_CVAR_SEC(crylink, joinspread) != 0)
558 self.crylink_lastgroup = proj;
559 W_Crylink_CheckLinks(proj);
560 self.crylink_waitrelease = 2;
564 float W_Crylink(float req)
572 self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), FALSE);
574 self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), FALSE);
580 if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) // forced reload
581 WEP_ACTION(self.weapon, WR_RELOAD);
583 if (self.BUTTON_ATCK)
585 if (self.crylink_waitrelease != 1)
586 if (weapon_prepareattack(0, WEP_CVAR_PRI(crylink, refire)))
589 weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(crylink, animtime), w_ready);
593 if(self.BUTTON_ATCK2 && autocvar_g_balance_crylink_secondary)
595 if (self.crylink_waitrelease != 2)
596 if (weapon_prepareattack(1, WEP_CVAR_SEC(crylink, refire)))
599 weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(crylink, animtime), w_ready);
603 if ((self.crylink_waitrelease == 1 && !self.BUTTON_ATCK) || (self.crylink_waitrelease == 2 && !self.BUTTON_ATCK2))
605 if (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time)
607 // fired and released now!
608 if(self.crylink_lastgroup)
611 entity linkjoineffect;
612 float isprimary = (self.crylink_waitrelease == 1);
614 pos = W_Crylink_LinkJoin(self.crylink_lastgroup, WEP_CVAR_BOTH(crylink, isprimary, joinspread) * WEP_CVAR_BOTH(crylink, isprimary, speed));
616 linkjoineffect = spawn();
617 linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
618 linkjoineffect.classname = "linkjoineffect";
619 linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
620 linkjoineffect.owner = self;
621 setorigin(linkjoineffect, pos);
623 self.crylink_waitrelease = 0;
624 if(!W_Crylink(WR_CHECKAMMO1) && !W_Crylink(WR_CHECKAMMO2))
625 if(!(self.items & IT_UNLIMITED_WEAPON_AMMO))
628 self.cnt = WEP_CRYLINK;
629 self.switchweapon = w_getbestweapon(self);
638 precache_model ("models/weapons/g_crylink.md3");
639 precache_model ("models/weapons/v_crylink.md3");
640 precache_model ("models/weapons/h_crylink.iqm");
641 precache_sound ("weapons/crylink_fire.wav");
642 precache_sound ("weapons/crylink_fire2.wav");
643 precache_sound ("weapons/crylink_linkjoin.wav");
644 CRYLINK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP)
649 // don't "run out of ammo" and switch weapons while waiting for release
650 if(self.crylink_lastgroup && self.crylink_waitrelease)
653 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_PRI(crylink, ammo);
654 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_PRI(crylink, ammo);
659 // don't "run out of ammo" and switch weapons while waiting for release
660 if(self.crylink_lastgroup && self.crylink_waitrelease)
663 ammo_amount = self.WEP_AMMO(CRYLINK) >= WEP_CVAR_SEC(crylink, ammo);
664 ammo_amount += self.(weapon_load[WEP_CRYLINK]) >= WEP_CVAR_SEC(crylink, ammo);
669 CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS)
674 W_Reload(min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), "weapons/reload.wav");
677 case WR_SUICIDEMESSAGE:
679 return WEAPON_CRYLINK_SUICIDE;
683 return WEAPON_CRYLINK_MURDER;
690 float W_Crylink(float req)
694 case WR_IMPACTEFFECT:
697 org2 = w_org + w_backoff * 2;
698 if(w_deathtype & HITTYPE_SECONDARY)
700 pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
702 sound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
706 pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
708 sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
715 precache_sound("weapons/crylink_impact2.wav");
716 precache_sound("weapons/crylink_impact.wav");
721 // no weapon specific image for this weapon