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));
66 .float rl_release[MAX_WEAPONSLOTS];
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 if(PS(this.realowner).m_weapon == thiswep)
121 if(this.realowner.(thiswep.ammo_field) < WEP_CVAR(devastator, ammo))
122 if(!(this.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
124 this.realowner.cnt = WEP_DEVASTATOR.m_id;
125 int slot = 0; // TODO: unhardcode
126 ATTACK_FINISHED(this.realowner, slot) = time;
127 PS(this.realowner).m_switchweapon = w_getbestweapon(this.realowner);
133 void W_Devastator_Explode_think(entity this)
135 W_Devastator_Explode(this, NULL);
138 void W_Devastator_DoRemoteExplode(entity this, .entity weaponentity)
140 W_Devastator_Unregister(this);
142 this.event_damage = func_null;
143 this.takedamage = DAMAGE_NO;
145 bool handled_as_rocketjump = false;
148 if(WEP_CVAR(devastator, remote_jump_radius))
150 head = WarpZone_FindRadius(
152 WEP_CVAR(devastator, remote_jump_radius),
158 if(head.takedamage && (head == this.realowner))
160 if(vdist(this.origin - head.WarpZone_findradius_nearest, <=, WEP_CVAR(devastator, remote_jump_radius)))
162 // we handled this as a rocketjump :)
163 handled_as_rocketjump = true;
166 if(WEP_CVAR(devastator, remote_jump_velocity_z_add))
168 head.velocity_x *= 0.9;
169 head.velocity_y *= 0.9;
170 head.velocity_z = bound(
171 WEP_CVAR(devastator, remote_jump_velocity_z_min),
172 head.velocity.z + WEP_CVAR(devastator, remote_jump_velocity_z_add),
173 WEP_CVAR(devastator, remote_jump_velocity_z_max)
181 WEP_CVAR(devastator, remote_jump_damage),
182 WEP_CVAR(devastator, remote_jump_damage),
183 WEP_CVAR(devastator, remote_jump_radius),
186 (WEP_CVAR(devastator, remote_jump_force) ? WEP_CVAR(devastator, remote_jump_force) : 0),
187 this.projectiledeathtype | HITTYPE_BOUNCE,
200 WEP_CVAR(devastator, remote_damage),
201 WEP_CVAR(devastator, remote_edgedamage),
202 WEP_CVAR(devastator, remote_radius),
203 (handled_as_rocketjump ? head : NULL),
205 WEP_CVAR(devastator, remote_force),
206 this.projectiledeathtype | HITTYPE_BOUNCE,
210 Weapon thiswep = WEP_DEVASTATOR;
211 if(PS(this.realowner).m_weapon == thiswep)
213 if(this.realowner.(thiswep.ammo_field) < WEP_CVAR(devastator, ammo))
214 if(!(this.realowner.items & IT_UNLIMITED_WEAPON_AMMO))
216 this.realowner.cnt = WEP_DEVASTATOR.m_id;
217 int slot = weaponslot(weaponentity);
218 ATTACK_FINISHED(this.realowner, slot) = time;
219 PS(this.realowner).m_switchweapon = w_getbestweapon(this.realowner);
225 void W_Devastator_RemoteExplode(entity this, .entity weaponentity)
227 if(!IS_DEAD(this.realowner))
228 if(this.realowner.(weaponentity).lastrocket)
230 if((this.spawnshieldtime >= 0)
231 ? (time >= this.spawnshieldtime) // timer
232 : (vdist(NearestPointOnBox(this.realowner, this.origin) - this.origin, >, WEP_CVAR(devastator, remote_radius))) // safety device
235 W_Devastator_DoRemoteExplode(this, weaponentity);
240 vector W_Devastator_SteerTo(vector thisdir, vector goaldir, float maxturn_cos)
242 if(thisdir * goaldir > maxturn_cos)
244 if(thisdir * goaldir < -0.9998) // less than 1 degree and opposite
245 return thisdir; // refuse to guide (better than letting a numerical error happen)
249 // g = normalize(thisdir + goaldir * X)
250 // thisdir * g = maxturn
252 // gg = thisdir + goaldir * X
253 // (thisdir * gg)^2 = maxturn^2 * (gg * gg)
255 // (1 + (thisdir * goaldir) * X)^2 = maxturn^2 * (1 + X*X + 2 * X * thisdir * goaldir)
256 f = thisdir * goaldir;
257 // (1 + f * X)^2 = maxturn^2 * (1 + X*X + 2 * X * f)
258 // 0 = (m^2 - f^2) * x^2 + (2 * f * (m^2 - 1)) * x + (m^2 - 1)
259 m2 = maxturn_cos * maxturn_cos;
260 v = solve_quadratic(m2 - f * f, 2 * f * (m2 - 1), m2 - 1);
261 return normalize(thisdir + goaldir * v.y); // the larger solution!
263 // assume thisdir == -goaldir:
265 // v = solve_qadratic(m2 - 1, -2 * (m2 - 1), m2 - 1)
266 // (m2 - 1) x^2 - 2 * (m2 - 1) * x + (m2 - 1) = 0
267 // x^2 - 2 * x + 1 = 0
270 // normalize(thisdir + goaldir)
273 void W_Devastator_Think(entity this)
275 vector desireddir, olddir, newdir, desiredorigin, goal;
277 this.nextthink = time;
280 this.projectiledeathtype |= HITTYPE_BOUNCE;
281 W_Devastator_Explode(this, NULL);
286 makevectors(this.angles.x * '-1 0 0' + this.angles.y * '0 1 0');
287 velspeed = WEP_CVAR(devastator, speed) * W_WeaponSpeedFactor(this.realowner) - (this.velocity * v_forward);
289 this.velocity = this.velocity + v_forward * min(WEP_CVAR(devastator, speedaccel) * W_WeaponSpeedFactor(this.realowner) * frametime, velspeed);
291 // laser guided, or remote detonation
292 if(PS(this.realowner).m_weapon == WEP_DEVASTATOR)
294 .entity weaponentity = this.weaponentity_fld;
295 int slot = weaponslot(weaponentity);
297 if(this == this.realowner.(weaponentity).lastrocket)
298 if(!this.realowner.rl_release[slot])
299 if(!PHYS_INPUT_BUTTON_ATCK2(this))
300 if(WEP_CVAR(devastator, guiderate))
301 if(time > this.pushltime)
302 if(!IS_DEAD(this.realowner))
304 f = WEP_CVAR(devastator, guideratedelay);
306 f = bound(0, (time - this.pushltime) / f, 1);
310 velspeed = vlen(this.velocity);
312 makevectors(this.realowner.v_angle);
313 desireddir = WarpZone_RefSys_TransformVelocity(this.realowner, this, v_forward);
314 desiredorigin = WarpZone_RefSys_TransformOrigin(this.realowner, this, this.realowner.origin + this.realowner.view_ofs);
315 olddir = normalize(this.velocity);
317 // now it gets tricky... we want to move like some curve to approximate the target direction
318 // but we are limiting the rate at which we can turn!
319 goal = desiredorigin + ((this.origin - desiredorigin) * desireddir + WEP_CVAR(devastator, guidegoal)) * desireddir;
320 newdir = W_Devastator_SteerTo(olddir, normalize(goal - this.origin), cos(WEP_CVAR(devastator, guiderate) * f * frametime * DEG2RAD));
322 this.velocity = newdir * velspeed;
323 this.angles = vectoangles(this.velocity);
327 Send_Effect(EFFECT_ROCKET_GUIDE, this.origin, this.velocity, 1);
328 // TODO add a better sound here
329 sound(this.realowner, CH_WEAPON_B, SND_ROCKET_MODE, VOL_BASE, ATTN_NORM);
334 if(this.rl_detonate_later)
335 W_Devastator_RemoteExplode(this, weaponentity);
338 if(this.csqcprojectile_clientanimate == 0)
339 UpdateCSQCProjectile(this);
342 void W_Devastator_Touch(entity this, entity toucher)
344 if(WarpZone_Projectile_Touch(this, toucher))
347 W_Devastator_Unregister(this);
350 W_Devastator_Unregister(this);
351 W_Devastator_Explode(this, toucher);
354 void W_Devastator_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
359 if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
360 return; // g_projectiles_damage says to halt
362 this.health = this.health - damage;
363 this.angles = vectoangles(this.velocity);
366 W_PrepareExplosionByDamage(this, attacker, W_Devastator_Explode_think);
369 void W_Devastator_Attack(Weapon thiswep, entity actor, .entity weaponentity)
371 W_DecreaseAmmo(thiswep, actor, WEP_CVAR(devastator, ammo));
373 W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage));
374 Send_Effect(EFFECT_ROCKET_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
376 entity missile = WarpZone_RefSys_SpawnSameRefSys(actor);
377 missile.weaponentity_fld = weaponentity;
378 missile.owner = missile.realowner = actor;
379 actor.(weaponentity).lastrocket = missile;
380 if(WEP_CVAR(devastator, detonatedelay) >= 0)
381 missile.spawnshieldtime = time + WEP_CVAR(devastator, detonatedelay);
383 missile.spawnshieldtime = -1;
384 missile.pushltime = time + WEP_CVAR(devastator, guidedelay);
385 missile.classname = "rocket";
386 missile.bot_dodge = true;
387 missile.bot_dodgerating = WEP_CVAR(devastator, damage) * 2; // * 2 because it can be detonated inflight which makes it even more dangerous
389 missile.takedamage = DAMAGE_YES;
390 missile.damageforcescale = WEP_CVAR(devastator, damageforcescale);
391 missile.health = WEP_CVAR(devastator, health);
392 missile.event_damage = W_Devastator_Damage;
393 missile.damagedbycontents = true;
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))
428 // aim and decide to fire if appropriate
429 PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, 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.clip_load < WEP_CVAR(devastator, ammo)) { // forced reload
508 thiswep.wr_reload(thiswep, actor, weaponentity);
510 int slot = weaponslot(weaponentity);
513 if(actor.rl_release[slot] || WEP_CVAR(devastator, guidestop))
514 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(devastator, refire)))
516 W_Devastator_Attack(thiswep, actor, weaponentity);
517 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR(devastator, animtime), w_ready);
518 actor.rl_release[slot] = 0;
522 actor.rl_release[slot] = 1;
525 if(PS(actor).m_switchweapon == WEP_DEVASTATOR)
527 bool rockfound = false;
528 IL_EACH(g_projectiles, it.realowner == actor && it.classname == "rocket",
530 if(!it.rl_detonate_later)
532 it.rl_detonate_later = true;
537 sound(actor, CH_WEAPON_B, SND_ROCKET_DET, VOL_BASE, ATTN_NORM);
541 METHOD(Devastator, wr_setup, void(entity thiswep, entity actor))
543 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
544 actor.rl_release[slot] = 1;
546 METHOD(Devastator, wr_checkammo1, bool(entity thiswep, entity actor))
549 // don't switch while guiding a missile
550 if(ATTACK_FINISHED(actor, slot) <= time || PS(actor).m_weapon != WEP_DEVASTATOR)
553 if(WEP_CVAR(devastator, reload_ammo))
555 if(actor.(thiswep.ammo_field) < WEP_CVAR(devastator, ammo) && actor.(weapon_load[WEP_DEVASTATOR.m_id]) < WEP_CVAR(devastator, ammo))
558 else if(actor.(thiswep.ammo_field) < WEP_CVAR(devastator, ammo))
564 if(actor.rl_release == 0)
566 LOG_INFOF("W_Devastator(WR_CHECKAMMO1): %d, %.2f, %d: TRUE\n", actor.rl_release, actor.(thiswep.ammo_field), WEP_CVAR(devastator, ammo));
571 ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR(devastator, ammo);
572 ammo_amount += actor.(weapon_load[WEP_DEVASTATOR.m_id]) >= WEP_CVAR(devastator, ammo);
573 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"));
577 float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR(devastator, ammo);
578 ammo_amount += actor.(weapon_load[WEP_DEVASTATOR.m_id]) >= WEP_CVAR(devastator, ammo);
582 METHOD(Devastator, wr_checkammo2, bool(entity thiswep, entity actor))
586 METHOD(Devastator, wr_resetplayer, void(entity thiswep, entity actor))
588 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
590 .entity weaponentity = weaponentities[slot];
591 actor.(weaponentity).lastrocket = NULL; // stop rocket guiding, no revenge from the grave!
592 actor.rl_release[slot] = 0;
595 METHOD(Devastator, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
597 W_Reload(actor, weaponentity, WEP_CVAR(devastator, ammo), SND_RELOAD);
599 METHOD(Devastator, wr_suicidemessage, Notification(entity thiswep))
601 return WEAPON_DEVASTATOR_SUICIDE;
603 METHOD(Devastator, wr_killmessage, Notification(entity thiswep))
605 if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
606 return WEAPON_DEVASTATOR_MURDER_SPLASH;
608 return WEAPON_DEVASTATOR_MURDER_DIRECT;
614 METHOD(Devastator, wr_impacteffect, void(entity thiswep, entity actor))
617 org2 = w_org + w_backoff * 12;
618 pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1);
620 sound(actor, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTN_NORM);