1 #include "devastator.qh"
3 CLASS(Devastator, Weapon)
4 /* ammotype */ ATTRIB(Devastator, ammo_field, .int, ammo_rockets);
5 /* impulse */ ATTRIB(Devastator, impulse, int, 9);
6 /* flags */ ATTRIB(Devastator, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
7 /* rating */ ATTRIB(Devastator, bot_pickupbasevalue, float, BOT_PICKUP_RATING_HIGH);
8 /* color */ ATTRIB(Devastator, wpcolor, vector, '1 1 0');
9 /* modelname */ ATTRIB(Devastator, mdl, string, "rl");
11 /* model */ ATTRIB(Devastator, m_model, Model, MDL_DEVASTATOR_ITEM);
13 /* crosshair */ ATTRIB(Devastator, w_crosshair, string, "gfx/crosshairrocketlauncher");
14 /* crosshair */ ATTRIB(Devastator, w_crosshair_size, float, 0.7);
15 /* wepimg */ ATTRIB(Devastator, model2, string, "weaponrocketlauncher");
16 /* refname */ ATTRIB(Devastator, netname, string, "devastator");
17 /* wepname */ ATTRIB(Devastator, m_name, string, _("Devastator"));
19 #define X(BEGIN, P, END, class, prefix) \
21 P(class, prefix, ammo, float, NONE) \
22 P(class, prefix, animtime, float, NONE) \
23 P(class, prefix, damageforcescale, float, NONE) \
24 P(class, prefix, damage, float, NONE) \
25 P(class, prefix, detonatedelay, float, NONE) \
26 P(class, prefix, edgedamage, float, NONE) \
27 P(class, prefix, force, float, NONE) \
28 P(class, prefix, guidedelay, float, NONE) \
29 P(class, prefix, guidegoal, float, NONE) \
30 P(class, prefix, guideratedelay, float, NONE) \
31 P(class, prefix, guiderate, float, NONE) \
32 P(class, prefix, guidestop, float, NONE) \
33 P(class, prefix, health, float, NONE) \
34 P(class, prefix, lifetime, float, NONE) \
35 P(class, prefix, radius, float, NONE) \
36 P(class, prefix, refire, float, NONE) \
37 P(class, prefix, reload_ammo, float, NONE) \
38 P(class, prefix, reload_time, float, NONE) \
39 P(class, prefix, remote_damage, float, NONE) \
40 P(class, prefix, remote_edgedamage, float, NONE) \
41 P(class, prefix, remote_force, float, NONE) \
42 P(class, prefix, remote_jump_damage, float, NONE) \
43 P(class, prefix, remote_jump_force, float, NONE) \
44 P(class, prefix, remote_jump_radius, float, NONE) \
45 P(class, prefix, remote_jump_velocity_z_add, float, NONE) \
46 P(class, prefix, remote_jump_velocity_z_max, float, NONE) \
47 P(class, prefix, remote_jump_velocity_z_min, float, NONE) \
48 P(class, prefix, remote_radius, float, NONE) \
49 P(class, prefix, speedaccel, float, NONE) \
50 P(class, prefix, speedstart, float, NONE) \
51 P(class, prefix, speed, float, NONE) \
52 P(class, prefix, switchdelay_drop, float, NONE) \
53 P(class, prefix, switchdelay_raise, float, NONE) \
54 P(class, prefix, weaponreplace, string,NONE) \
55 P(class, prefix, weaponstartoverride, float, NONE) \
56 P(class, prefix, weaponstart, float, NONE) \
57 P(class, prefix, weaponthrowable, float, NONE) \
59 W_PROPS(X, Devastator, devastator)
63 REGISTER_WEAPON(DEVASTATOR, devastator, NEW(Devastator));
67 .float rl_detonate_later;
72 spawnfunc(weapon_devastator) { weapon_defaultspawnfunc(this, WEP_DEVASTATOR); }
73 spawnfunc(weapon_rocketlauncher) { spawnfunc_weapon_devastator(this); }
77 void W_Devastator_Unregister(entity this)
79 if(this.realowner && this.realowner.lastrocket == this)
81 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
83 .entity weaponentity = weaponentities[slot];
84 if(this.realowner.(weaponentity).lastrocket == this)
85 this.realowner.(weaponentity).lastrocket = NULL;
87 // this.realowner.rl_release = 1;
91 void W_Devastator_Explode(entity this, entity directhitentity)
93 W_Devastator_Unregister(this);
95 if(directhitentity.takedamage == DAMAGE_AIM)
96 if(IS_PLAYER(directhitentity))
97 if(DIFF_TEAM(this.realowner, directhitentity))
98 if(!IS_DEAD(directhitentity))
99 if(IsFlying(directhitentity))
100 Send_Notification(NOTIF_ONE, this.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_AIRSHOT);
102 this.event_damage = func_null;
103 this.takedamage = DAMAGE_NO;
108 WEP_CVAR(devastator, damage),
109 WEP_CVAR(devastator, edgedamage),
110 WEP_CVAR(devastator, radius),
113 WEP_CVAR(devastator, force),
114 this.projectiledeathtype,
118 Weapon thiswep = WEP_DEVASTATOR;
119 .entity weaponentity = this.weaponentity_fld;
120 if(this.realowner.(weaponentity).m_weapon == thiswep)
122 if(this.realowner.(thiswep.ammo_field) < WEP_CVAR(devastator, ammo))
123 if(!(this.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
125 this.realowner.cnt = WEP_DEVASTATOR.m_id;
126 int slot = weaponslot(weaponentity);
127 ATTACK_FINISHED(this.realowner, slot) = time;
128 this.realowner.(weaponentity).m_switchweapon = w_getbestweapon(this.realowner, weaponentity);
134 void W_Devastator_Explode_think(entity this)
136 W_Devastator_Explode(this, NULL);
139 void W_Devastator_DoRemoteExplode(entity this, .entity weaponentity)
141 W_Devastator_Unregister(this);
143 this.event_damage = func_null;
144 this.takedamage = DAMAGE_NO;
146 bool handled_as_rocketjump = false;
149 if(WEP_CVAR(devastator, remote_jump_radius))
151 head = WarpZone_FindRadius(
153 WEP_CVAR(devastator, remote_jump_radius),
159 if(head.takedamage && (head == this.realowner))
161 if(vdist(this.origin - head.WarpZone_findradius_nearest, <=, WEP_CVAR(devastator, remote_jump_radius)))
163 // we handled this as a rocketjump :)
164 handled_as_rocketjump = true;
167 if(WEP_CVAR(devastator, remote_jump_velocity_z_add))
169 head.velocity_x *= 0.9;
170 head.velocity_y *= 0.9;
171 head.velocity_z = bound(
172 WEP_CVAR(devastator, remote_jump_velocity_z_min),
173 head.velocity.z + WEP_CVAR(devastator, remote_jump_velocity_z_add),
174 WEP_CVAR(devastator, remote_jump_velocity_z_max)
182 WEP_CVAR(devastator, remote_jump_damage),
183 WEP_CVAR(devastator, remote_jump_damage),
184 WEP_CVAR(devastator, remote_jump_radius),
187 (WEP_CVAR(devastator, remote_jump_force) ? WEP_CVAR(devastator, remote_jump_force) : 0),
188 this.projectiledeathtype | HITTYPE_BOUNCE,
201 WEP_CVAR(devastator, remote_damage),
202 WEP_CVAR(devastator, remote_edgedamage),
203 WEP_CVAR(devastator, remote_radius),
204 (handled_as_rocketjump ? head : NULL),
206 WEP_CVAR(devastator, remote_force),
207 this.projectiledeathtype | HITTYPE_BOUNCE,
211 Weapon thiswep = WEP_DEVASTATOR;
212 if(this.realowner.(weaponentity).m_weapon == thiswep)
214 if(this.realowner.(thiswep.ammo_field) < WEP_CVAR(devastator, ammo))
215 if(!(this.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
217 this.realowner.cnt = WEP_DEVASTATOR.m_id;
218 int slot = weaponslot(weaponentity);
219 ATTACK_FINISHED(this.realowner, slot) = time;
220 this.realowner.(weaponentity).m_switchweapon = w_getbestweapon(this.realowner, weaponentity);
226 void W_Devastator_RemoteExplode(entity this, .entity weaponentity)
228 if(!IS_DEAD(this.realowner))
229 if(this.realowner.(weaponentity).lastrocket)
231 if((this.spawnshieldtime >= 0)
232 ? (time >= this.spawnshieldtime) // timer
233 : (vdist(NearestPointOnBox(this.realowner, this.origin) - this.origin, >, WEP_CVAR(devastator, remote_radius))) // safety device
236 W_Devastator_DoRemoteExplode(this, weaponentity);
241 vector W_Devastator_SteerTo(vector thisdir, vector goaldir, float maxturn_cos)
243 if(thisdir * goaldir > maxturn_cos)
245 if(thisdir * goaldir < -0.9998) // less than 1 degree and opposite
246 return thisdir; // refuse to guide (better than letting a numerical error happen)
250 // g = normalize(thisdir + goaldir * X)
251 // thisdir * g = maxturn
253 // gg = thisdir + goaldir * X
254 // (thisdir * gg)^2 = maxturn^2 * (gg * gg)
256 // (1 + (thisdir * goaldir) * X)^2 = maxturn^2 * (1 + X*X + 2 * X * thisdir * goaldir)
257 f = thisdir * goaldir;
258 // (1 + f * X)^2 = maxturn^2 * (1 + X*X + 2 * X * f)
259 // 0 = (m^2 - f^2) * x^2 + (2 * f * (m^2 - 1)) * x + (m^2 - 1)
260 m2 = maxturn_cos * maxturn_cos;
261 v = solve_quadratic(m2 - f * f, 2 * f * (m2 - 1), m2 - 1);
262 return normalize(thisdir + goaldir * v.y); // the larger solution!
264 // assume thisdir == -goaldir:
266 // v = solve_qadratic(m2 - 1, -2 * (m2 - 1), m2 - 1)
267 // (m2 - 1) x^2 - 2 * (m2 - 1) * x + (m2 - 1) = 0
268 // x^2 - 2 * x + 1 = 0
271 // normalize(thisdir + goaldir)
274 void W_Devastator_Think(entity this)
276 vector desireddir, olddir, newdir, desiredorigin, goal;
278 this.nextthink = time;
281 this.projectiledeathtype |= HITTYPE_BOUNCE;
282 W_Devastator_Explode(this, NULL);
287 makevectors(this.angles.x * '-1 0 0' + this.angles.y * '0 1 0');
288 velspeed = WEP_CVAR(devastator, speed) * W_WeaponSpeedFactor(this.realowner) - (this.velocity * v_forward);
290 this.velocity = this.velocity + v_forward * min(WEP_CVAR(devastator, speedaccel) * W_WeaponSpeedFactor(this.realowner) * frametime, velspeed);
292 // laser guided, or remote detonation
293 .entity weaponentity = this.weaponentity_fld;
294 if(this.realowner.(weaponentity).m_weapon == WEP_DEVASTATOR)
296 if(this == this.realowner.(weaponentity).lastrocket)
297 if(!this.realowner.(weaponentity).rl_release)
298 if(!PHYS_INPUT_BUTTON_ATCK2(this))
299 if(WEP_CVAR(devastator, guiderate))
300 if(time > this.pushltime)
301 if(!IS_DEAD(this.realowner))
303 f = WEP_CVAR(devastator, guideratedelay);
305 f = bound(0, (time - this.pushltime) / f, 1);
309 velspeed = vlen(this.velocity);
311 makevectors(this.realowner.v_angle);
312 desireddir = WarpZone_RefSys_TransformVelocity(this.realowner, this, v_forward);
313 desiredorigin = WarpZone_RefSys_TransformOrigin(this.realowner, this, this.realowner.origin + this.realowner.view_ofs);
314 olddir = normalize(this.velocity);
316 // now it gets tricky... we want to move like some curve to approximate the target direction
317 // but we are limiting the rate at which we can turn!
318 goal = desiredorigin + ((this.origin - desiredorigin) * desireddir + WEP_CVAR(devastator, guidegoal)) * desireddir;
319 newdir = W_Devastator_SteerTo(olddir, normalize(goal - this.origin), cos(WEP_CVAR(devastator, guiderate) * f * frametime * DEG2RAD));
321 this.velocity = newdir * velspeed;
322 this.angles = vectoangles(this.velocity);
326 Send_Effect(EFFECT_ROCKET_GUIDE, this.origin, this.velocity, 1);
327 // TODO add a better sound here
328 sound(this.realowner, CH_WEAPON_B, SND_ROCKET_MODE, VOL_BASE, ATTN_NORM);
333 if(this.rl_detonate_later)
334 W_Devastator_RemoteExplode(this, weaponentity);
337 if(this.csqcprojectile_clientanimate == 0)
338 UpdateCSQCProjectile(this);
341 void W_Devastator_Touch(entity this, entity toucher)
343 if(WarpZone_Projectile_Touch(this, toucher))
346 W_Devastator_Unregister(this);
349 W_Devastator_Unregister(this);
350 W_Devastator_Explode(this, toucher);
353 void W_Devastator_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
358 if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
359 return; // g_projectiles_damage says to halt
361 this.health = this.health - damage;
362 this.angles = vectoangles(this.velocity);
365 W_PrepareExplosionByDamage(this, attacker, W_Devastator_Explode_think);
368 void W_Devastator_Attack(Weapon thiswep, entity actor, .entity weaponentity)
370 W_DecreaseAmmo(thiswep, actor, WEP_CVAR(devastator, ammo), weaponentity);
372 W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage));
373 Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
375 entity missile = WarpZone_RefSys_SpawnSameRefSys(actor);
376 missile.weaponentity_fld = weaponentity;
377 missile.owner = missile.realowner = actor;
378 actor.(weaponentity).lastrocket = missile;
379 if(WEP_CVAR(devastator, detonatedelay) >= 0)
380 missile.spawnshieldtime = time + WEP_CVAR(devastator, detonatedelay);
382 missile.spawnshieldtime = -1;
383 missile.pushltime = time + WEP_CVAR(devastator, guidedelay);
384 missile.classname = "rocket";
385 missile.bot_dodge = true;
386 missile.bot_dodgerating = WEP_CVAR(devastator, damage) * 2; // * 2 because it can be detonated inflight which makes it even more dangerous
388 missile.takedamage = DAMAGE_YES;
389 missile.damageforcescale = WEP_CVAR(devastator, damageforcescale);
390 missile.health = WEP_CVAR(devastator, health);
391 missile.event_damage = W_Devastator_Damage;
392 missile.damagedbycontents = true;
393 IL_PUSH(g_damagedbycontents, missile);
395 set_movetype(missile, MOVETYPE_FLY);
396 PROJECTILE_MAKETRIGGER(missile);
397 missile.projectiledeathtype = WEP_DEVASTATOR.m_id;
398 setsize(missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
400 setorigin(missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
401 W_SetupProjVelocity_Basic(missile, WEP_CVAR(devastator, speedstart), 0);
402 missile.angles = vectoangles(missile.velocity);
404 settouch(missile, W_Devastator_Touch);
405 setthink(missile, W_Devastator_Think);
406 missile.nextthink = time;
407 missile.cnt = time + WEP_CVAR(devastator, lifetime);
408 missile.flags = FL_PROJECTILE;
409 IL_PUSH(g_projectiles, missile);
410 IL_PUSH(g_bot_dodge, missile);
411 missile.missile_flags = MIF_SPLASH;
413 CSQCProjectile(missile, WEP_CVAR(devastator, guiderate) == 0 && WEP_CVAR(devastator, speedaccel) == 0, PROJECTILE_ROCKET, false); // because of fly sound
415 // muzzle flash for 1st person view
416 entity flash = spawn();
417 setmodel(flash, MDL_DEVASTATOR_MUZZLEFLASH); // precision set below
418 SUB_SetFade(flash, time, 0.1);
419 flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
420 W_AttachToShotorg(actor, weaponentity, flash, '5 0 0');
423 MUTATOR_CALLHOOK(EditProjectile, actor, missile);
426 METHOD(Devastator, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
428 // aim and decide to fire if appropriate
429 PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
430 if(skill >= 2) // skill 0 and 1 bots won't detonate rockets!
432 // decide whether to detonate rockets
433 float edgedamage, coredamage, edgeradius, recipricoledgeradius;
434 float selfdamage, teamdamage, enemydamage;
435 edgedamage = WEP_CVAR(devastator, edgedamage);
436 coredamage = WEP_CVAR(devastator, damage);
437 edgeradius = WEP_CVAR(devastator, radius);
438 recipricoledgeradius = 1 / edgeradius;
442 IL_EACH(g_projectiles, it.realowner == actor && it.classname == "rocket",
445 IL_EACH(g_bot_targets, it.bot_attack,
447 float d = vlen(it.origin + (it.mins + it.maxs) * 0.5 - rocket.origin);
448 d = bound(0, edgedamage + (coredamage - edgedamage) * sqrt(1 - d * recipricoledgeradius), 10000);
449 // count potential damage according to type of target
451 selfdamage = selfdamage + d;
452 else if(SAME_TEAM(it, actor))
453 teamdamage = teamdamage + d;
454 else if(bot_shouldattack(actor, it))
455 enemydamage = enemydamage + d;
458 float desirabledamage;
459 desirabledamage = enemydamage;
460 if(time > actor.invincible_finished && time > actor.spawnshieldtime)
461 desirabledamage = desirabledamage - selfdamage * autocvar_g_balance_selfdamagepercent;
462 if(teamplay && actor.team)
463 desirabledamage = desirabledamage - teamdamage;
465 makevectors(actor.v_angle);
466 IL_EACH(g_projectiles, it.realowner == actor && it.classname == "rocket",
468 if(skill > 9) // normal players only do this for the target they are tracking
471 IL_EACH(g_bot_targets, it.bot_attack,
473 if((v_forward * normalize(rocket.origin - it.origin) < 0.1)
474 && desirabledamage > 0.1 * coredamage
475 ) PHYS_INPUT_BUTTON_ATCK2(actor) = true;
480 //As the distance gets larger, a correct detonation gets near imposible
481 //Bots are assumed to use the rocket spawnfunc_light to see if the rocket gets near a player
482 if((v_forward * normalize(it.origin - actor.enemy.origin) < 0.1)
483 && IS_PLAYER(actor.enemy)
484 && (desirabledamage >= 0.1 * coredamage)
487 float distance = bound(300, vlen(actor.origin - actor.enemy.origin), 30000);
488 if(random() / distance * 300 > frametime * bound(0, (10 - skill) * 0.2, 1))
489 PHYS_INPUT_BUTTON_ATCK2(actor) = true;
493 // if we would be doing at X percent of the core damage, detonate it
494 // but don't fire a new shot at the same time!
495 if(desirabledamage >= 0.75 * coredamage) //this should do group damage in rare fortunate events
496 PHYS_INPUT_BUTTON_ATCK2(actor) = true;
497 if((skill > 6.5) && (selfdamage > actor.health))
498 PHYS_INPUT_BUTTON_ATCK2(actor) = false;
499 //if(PHYS_INPUT_BUTTON_ATCK2(actor) == true)
500 // dprint(ftos(desirabledamage),"\n");
501 if(PHYS_INPUT_BUTTON_ATCK2(actor)) PHYS_INPUT_BUTTON_ATCK(actor) = false;
505 METHOD(Devastator, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
507 if(WEP_CVAR(devastator, reload_ammo) && actor.(weaponentity).clip_load < WEP_CVAR(devastator, ammo)) { // forced reload
508 thiswep.wr_reload(thiswep, actor, weaponentity);
512 if(actor.(weaponentity).rl_release || WEP_CVAR(devastator, guidestop))
513 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(devastator, refire)))
515 W_Devastator_Attack(thiswep, actor, weaponentity);
516 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(devastator, animtime), w_ready);
517 actor.(weaponentity).rl_release = 0;
521 actor.(weaponentity).rl_release = 1;
524 if(actor.(weaponentity).m_switchweapon == WEP_DEVASTATOR)
526 bool rockfound = false;
527 IL_EACH(g_projectiles, it.realowner == actor && it.classname == "rocket",
529 if(!it.rl_detonate_later)
531 it.rl_detonate_later = true;
536 sound(actor, CH_WEAPON_B, SND_ROCKET_DET, VOL_BASE, ATTN_NORM);
540 METHOD(Devastator, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
542 actor.(weaponentity).rl_release = 1;
544 METHOD(Devastator, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
547 // don't switch while guiding a missile
548 if(ATTACK_FINISHED(actor, slot) <= time || PS(actor).m_weapon != WEP_DEVASTATOR)
551 if(WEP_CVAR(devastator, reload_ammo))
553 if(actor.(thiswep.ammo_field) < WEP_CVAR(devastator, ammo) && actor.(weaponentity).(weapon_load[WEP_DEVASTATOR.m_id]) < WEP_CVAR(devastator, ammo))
556 else if(actor.(thiswep.ammo_field) < WEP_CVAR(devastator, ammo))
562 if(actor.rl_release == 0)
564 LOG_INFOF("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: TRUE\n", actor.rl_release, actor.(thiswep.ammo_field), WEP_CVAR(devastator, ammo));
569 ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR(devastator, ammo);
570 ammo_amount += actor.(weaponentity).(weapon_load[WEP_DEVASTATOR.m_id]) >= WEP_CVAR(devastator, ammo);
571 LOG_INFOF("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: %s\n", actor.rl_release, actor.(thiswep.ammo_field), WEP_CVAR(devastator, ammo), (ammo_amount ? "TRUE" : "FALSE"));
575 float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR(devastator, ammo);
576 ammo_amount += actor.(weaponentity).(weapon_load[WEP_DEVASTATOR.m_id]) >= WEP_CVAR(devastator, ammo);
580 METHOD(Devastator, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
584 METHOD(Devastator, wr_resetplayer, void(entity thiswep, entity actor))
586 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
588 .entity weaponentity = weaponentities[slot];
589 actor.(weaponentity).lastrocket = NULL; // stop rocket guiding, no revenge from the grave!
590 actor.(weaponentity).rl_release = 0;
593 METHOD(Devastator, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
595 W_Reload(actor, weaponentity, WEP_CVAR(devastator, ammo), SND_RELOAD);
597 METHOD(Devastator, wr_suicidemessage, Notification(entity thiswep))
599 return WEAPON_DEVASTATOR_SUICIDE;
601 METHOD(Devastator, wr_killmessage, Notification(entity thiswep))
603 if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
604 return WEAPON_DEVASTATOR_MURDER_SPLASH;
606 return WEAPON_DEVASTATOR_MURDER_DIRECT;
612 METHOD(Devastator, wr_impacteffect, void(entity thiswep, entity actor))
615 org2 = w_org + w_backoff * 12;
616 pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1);
618 sound(actor, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTN_NORM);