1 #include "vaporizer.qh"
3 CLASS(Vaporizer, Weapon)
4 /* ammotype */ ATTRIB(Vaporizer, ammo_field, .int, ammo_cells);
5 /* impulse */ ATTRIB(Vaporizer, impulse, int, 7);
6 /* flags */ ATTRIB(Vaporizer, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN);
7 /* rating */ ATTRIB(Vaporizer, bot_pickupbasevalue, float, BOT_PICKUP_RATING_HIGH);
8 /* color */ ATTRIB(Vaporizer, wpcolor, vector, '0.5 1 1');
9 /* modelname */ ATTRIB(Vaporizer, mdl, string, "minstanex");
11 /* model */ ATTRIB(Vaporizer, m_model, Model, MDL_VAPORIZER_ITEM);
13 /* crosshair */ ATTRIB(Vaporizer, w_crosshair, string, "gfx/crosshairminstanex");
14 /* crosshair */ ATTRIB(Vaporizer, w_crosshair_size, float, 0.6);
15 /* reticle */ ATTRIB(Vaporizer, w_reticle, string, "gfx/reticle_nex");
16 /* wepimg */ ATTRIB(Vaporizer, model2, string, "weaponminstanex");
17 /* refname */ ATTRIB(Vaporizer, netname, string, "vaporizer");
18 /* wepname */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
20 #define X(BEGIN, P, END, class, prefix) \
22 P(class, prefix, ammo, float, PRI) \
23 P(class, prefix, animtime, float, PRI) \
24 P(class, prefix, damage, float, PRI) \
25 P(class, prefix, refire, float, PRI) \
26 P(class, prefix, ammo, float, SEC) \
27 P(class, prefix, animtime, float, SEC) \
28 P(class, prefix, damage, float, SEC) \
29 P(class, prefix, delay, float, SEC) \
30 P(class, prefix, edgedamage, float, SEC) \
31 P(class, prefix, force, float, SEC) \
32 P(class, prefix, lifetime, float, SEC) \
33 P(class, prefix, radius, float, SEC) \
34 P(class, prefix, refire, float, SEC) \
35 P(class, prefix, shotangle, float, SEC) \
36 P(class, prefix, speed, float, SEC) \
37 P(class, prefix, spread, float, SEC) \
38 P(class, prefix, reload_ammo, float, NONE) \
39 P(class, prefix, reload_time, float, NONE) \
40 P(class, prefix, switchdelay_raise, float, NONE) \
41 P(class, prefix, switchdelay_drop, float, NONE) \
42 P(class, prefix, weaponreplace, string, NONE) \
43 P(class, prefix, weaponstart, float, NONE) \
44 P(class, prefix, weaponstartoverride, float, NONE) \
45 P(class, prefix, weaponthrowable, float, NONE) \
47 W_PROPS(X, Vaporizer, vaporizer)
51 REGISTER_WEAPON(VAPORIZER, vaporizer, NEW(Vaporizer));
55 .float vaporizer_lasthit;
57 .float jump_interval2;
66 REGISTER_NET_TEMP(TE_CSQC_VAPORBEAMPARTICLE)
69 void SendCSQCVaporizerBeamParticle(entity player, int hit) {
71 v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
72 WriteHeader(MSG_BROADCAST, TE_CSQC_VAPORBEAMPARTICLE);
73 WriteCoord(MSG_BROADCAST, w_shotorg.x);
74 WriteCoord(MSG_BROADCAST, w_shotorg.y);
75 WriteCoord(MSG_BROADCAST, w_shotorg.z);
76 WriteCoord(MSG_BROADCAST, v.x);
77 WriteCoord(MSG_BROADCAST, v.y);
78 WriteCoord(MSG_BROADCAST, v.z);
79 WriteByte(MSG_BROADCAST, hit);
80 WriteByte(MSG_BROADCAST, etof(player));
81 WriteByte(MSG_BROADCAST, player.team);
84 bool autocvar_cl_vaporizerbeam_particle = false;
85 float autocvar_cl_vaporizerbeam_lifetime = 0.8;
86 float autocvar_cl_vaporizerbeam_colorboost = 0.7;
88 string Draw_VaporizerBeam_trace_callback_tex;
89 float Draw_VaporizerBeam_trace_callback_rnd;
90 vector Draw_VaporizerBeam_trace_callback_rgb;
91 float Draw_VaporizerBeam_trace_callback_a;
92 void Draw_VaporizerBeam_trace_callback(vector start, vector hit, vector end)
96 vorg = WarpZone_TransformOrigin(WarpZone_trace_transform, view_origin);
97 for(i = 0; i < Draw_VaporizerBeam_trace_callback_a; ++i)
98 Draw_CylindricLine(hit, start, 8, Draw_VaporizerBeam_trace_callback_tex, 0.25, Draw_VaporizerBeam_trace_callback_rnd, Draw_VaporizerBeam_trace_callback_rgb, min(1, Draw_VaporizerBeam_trace_callback_a - i), DRAWFLAG_NORMAL, vorg);
99 Draw_VaporizerBeam_trace_callback_rnd += 0.25 * vlen(hit - start) / 8;
102 .vector vorg1, vorg2;
104 void VaporizerBeam_Draw(entity this)
106 //draw either the old v2.3 beam or the new beam
107 particles_alphamin = particles_alphamax = particles_fade = 1;
109 string tex = "particles/lgbeam";
111 tex = "particles/gauntletbeam";
113 //entity e = CSQCModel_server2csqc(this.sv_entnum - 1);
116 rgb = colormapPaletteColor(entcs_GetClientColors(this.sv_entnum - 1) & 0x0F, true);
121 rgb *= (1 + autocvar_cl_vaporizerbeam_colorboost);
123 float fail = (this.nextthink - time);
125 Draw_VaporizerBeam_trace_callback_tex = tex;
126 Draw_VaporizerBeam_trace_callback_rnd = 0;
127 Draw_VaporizerBeam_trace_callback_rgb = rgb;
128 Draw_VaporizerBeam_trace_callback_a = bound(0, fail, 1);
129 WarpZone_TraceBox_ThroughZone(this.vorg1, '0 0 0', '0 0 0', this.vorg2, MOVE_NOTHING, NULL, NULL, Draw_VaporizerBeam_trace_callback);
130 Draw_VaporizerBeam_trace_callback_tex = string_null;
132 /*if(!MUTATOR_CALLHOOK(Particles_VaporizerBeam, this.vorg1, this.vorg2))
133 if(autocvar_cl_particles_oldvortexbeam && (STAT(ALLOW_OLDVORTEXBEAM) || isdemo()))
134 WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), this.vorg1, this.vorg2, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
136 WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM), this.vorg1, this.vorg2, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);*/
139 NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE, bool isNew)
141 Net_Accept(vortex_beam);
142 setthink(this, SUB_Remove);
143 this.nextthink = time + bound(0, autocvar_cl_vaporizerbeam_lifetime, 10);
144 this.draw = VaporizerBeam_Draw;
145 if (isNew) IL_PUSH(g_drawables, this);
146 this.drawmask = MASK_NORMAL;
148 this.vorg1_x = ReadCoord(); this.vorg1_y = ReadCoord(); this.vorg1_z = ReadCoord();
149 this.vorg2_x = ReadCoord(); this.vorg2_y = ReadCoord(); this.vorg2_z = ReadCoord();
150 this.cnt = ReadByte();
151 int myowner = ReadByte();
152 this.owner = playerslots[myowner - 1];
153 this.sv_entnum = myowner;
154 this.team = ReadByte() - 1;
156 pointparticles(EFFECT_VORTEX_MUZZLEFLASH, this.vorg1, normalize(this.vorg2 - this.vorg1) * 1000, 1);
158 if(autocvar_cl_vaporizerbeam_particle)
160 WarpZone_TrailParticles(NULL, particleeffectnum(((this.cnt) ? EFFECT_VAPORIZER_HIT(this.team) : EFFECT_VAPORIZER(this.team))), this.vorg1, this.vorg2);
161 this.draw = func_null;
162 this.drawmask = MASK_NORMAL;
171 spawnfunc(weapon_vaporizer) { weapon_defaultspawnfunc(this, WEP_VAPORIZER); }
172 spawnfunc(weapon_minstanex) { spawnfunc_weapon_vaporizer(this); }
174 void W_RocketMinsta_Explosion(entity actor, vector loc)
176 if(accuracy_canbegooddamage(actor))
177 accuracy_add(actor, WEP_DEVASTATOR.m_id, autocvar_g_rm_damage, 0);
178 entity dmgent = spawn();
179 dmgent.owner = dmgent.realowner = actor;
180 setorigin(dmgent, loc);
181 RadiusDamage (dmgent, actor, autocvar_g_rm_damage, autocvar_g_rm_edgedamage, autocvar_g_rm_radius, NULL, NULL, autocvar_g_rm_force, WEP_DEVASTATOR.m_id | HITTYPE_SPLASH, other);
185 void W_Vaporizer_Attack(Weapon thiswep, entity actor, .entity weaponentity)
187 bool flying = IsFlying(actor); // do this BEFORE to make the trace values from FireRailgunBullet last
188 float vaporizer_damage = ((WEP_CVAR_PRI(vaporizer, damage) > 0) ? WEP_CVAR_PRI(vaporizer, damage) : 10000);
190 W_SetupShot(actor, weaponentity, true, 0, SND_Null, CH_WEAPON_A, vaporizer_damage);
191 // handle sound separately so we can change the volume
192 // added bonus: no longer plays the strength sound (strength gives no bonus to instakill anyway)
193 sound (actor, CH_WEAPON_A, SND_MINSTANEXFIRE, VOL_BASE * 0.8, ATTEN_NORM);
197 FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, vaporizer_damage, 800, 0, 0, 0, 0, WEP_VAPORIZER.m_id);
199 // do this now, as goodhits is disabled below
200 SendCSQCVaporizerBeamParticle(actor, damage_goodhits);
203 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
204 if(damage_goodhits && actor.vaporizer_lasthit)
206 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
207 damage_goodhits = 0; // only every second time
210 actor.vaporizer_lasthit = damage_goodhits;
213 if(!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT)))
214 W_RocketMinsta_Explosion(actor, trace_endpos);
216 W_DecreaseAmmo(thiswep, actor, ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo)), weaponentity);
219 void W_RocketMinsta_Laser_Explode (entity this)
221 if(other.takedamage == DAMAGE_AIM)
223 if(DIFF_TEAM(this.realowner, other))
226 Send_Notification(NOTIF_ONE, this.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH);
228 this.event_damage = func_null;
229 this.takedamage = DAMAGE_NO;
230 RadiusDamage (this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, other);
234 void W_RocketMinsta_Laser_Explode_use(entity this, entity actor, entity trigger)
236 W_RocketMinsta_Laser_Explode(this);
239 void W_RocketMinsta_Laser_Touch(entity this, entity toucher)
241 PROJECTILE_TOUCH(this, toucher);
242 //W_RocketMinsta_Laser_Explode ();
243 RadiusDamage(this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, toucher);
247 void W_RocketMinsta_Attack2(entity actor, .entity weaponentity)
249 makevectors(actor.v_angle);
253 float total = autocvar_g_rm_laser_count;
254 float spread = autocvar_g_rm_laser_spread;
255 float rndspread = autocvar_g_rm_laser_spread_random;
257 Weapon w = actor.(weaponentity).m_weapon;
258 actor.(weaponentity).m_weapon = WEP_ELECTRO;
259 W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, autocvar_g_rm_laser_damage);
260 actor.(weaponentity).m_weapon = w;
262 Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
264 while(counter < total)
266 proj = new(plasma_prim);
267 proj.owner = proj.realowner = actor;
268 proj.bot_dodge = true;
269 proj.bot_dodgerating = autocvar_g_rm_laser_damage;
270 proj.use = W_RocketMinsta_Laser_Explode_use;
271 setthink(proj, adaptor_think2use_hittype_splash);
272 proj.nextthink = time + autocvar_g_rm_laser_lifetime;
273 PROJECTILE_MAKETRIGGER(proj);
274 proj.projectiledeathtype = WEP_ELECTRO.m_id;
275 setorigin(proj, w_shotorg);
277 proj.rm_force = autocvar_g_rm_laser_force / total;
278 proj.rm_damage = autocvar_g_rm_laser_damage / total;
279 proj.rm_edmg = proj.rm_damage;
281 //W_SetupProjectileVelocity(proj, autocvar_g_rm_laser_speed, spread * (rndspread ? random() : 1) * autocvar_g_rm_laser_speed);
283 set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
284 //W_SETUPPROJECTILEVELOCITY(proj, g_balance_minstanex_laser);
285 proj.velocity = (w_shotdir + (((counter + 0.5) / total) * 2 - 1) * v_right * (spread * (rndspread ? random() : 1))) * cvar("g_rm_laser_speed");
286 proj.velocity_z = proj.velocity_z + cvar("g_rm_laser_zspread") * (random() - 0.5);
287 proj.velocity = W_CalculateProjectileVelocity(actor, actor.velocity, proj.velocity, true);
288 proj.angles = vectoangles(proj.velocity);
289 settouch(proj, W_RocketMinsta_Laser_Touch);
290 setsize(proj, '0 0 -3', '0 0 -3');
291 proj.flags = FL_PROJECTILE;
292 IL_PUSH(g_projectiles, proj);
293 IL_PUSH(g_bot_dodge, proj);
294 proj.missile_flags = MIF_SPLASH;
296 CSQCProjectile(proj, true, PROJECTILE_ROCKETMINSTA_LASER, true);
298 MUTATOR_CALLHOOK(EditProjectile, actor, proj);
303 void W_RocketMinsta_Attack3 (entity actor, .entity weaponentity)
305 makevectors(actor.v_angle);
311 Weapon w = actor.(weaponentity).m_weapon;
312 actor.(weaponentity).m_weapon = WEP_ELECTRO;
313 W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_ELECTRO_FIRE2, CH_WEAPON_A, autocvar_g_rm_laser_damage);
314 actor.(weaponentity).m_weapon = w;
316 Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
318 while(counter < total)
320 proj = new(plasma_prim);
321 proj.owner = proj.realowner = actor;
322 proj.bot_dodge = true;
323 proj.bot_dodgerating = autocvar_g_rm_laser_damage;
324 proj.use = W_RocketMinsta_Laser_Explode_use;
325 setthink(proj, adaptor_think2use_hittype_splash);
326 proj.nextthink = time + autocvar_g_rm_laser_lifetime;
327 PROJECTILE_MAKETRIGGER(proj);
328 proj.projectiledeathtype = WEP_ELECTRO.m_id;
329 setorigin(proj, w_shotorg);
331 proj.rm_force = autocvar_g_rm_laser_force / total;
332 proj.rm_damage = autocvar_g_rm_laser_damage / total;
333 proj.rm_edmg = proj.rm_damage;
335 //W_SetupProjectileVelocity(proj, autocvar_g_rm_laser_speed, spread * (rndspread ? random() : 1) * autocvar_g_rm_laser_speed);
337 set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
338 proj.velocity = w_shotdir * autocvar_g_rm_laser_speed;
339 proj.velocity = W_CalculateProjectileVelocity(actor, actor.velocity, proj.velocity, true);
340 proj.angles = vectoangles(proj.velocity);
341 settouch(proj, W_RocketMinsta_Laser_Touch);
342 setsize(proj, '0 0 -3', '0 0 -3');
343 proj.flags = FL_PROJECTILE;
344 IL_PUSH(g_projectiles, proj);
345 IL_PUSH(g_bot_dodge, proj);
346 proj.missile_flags = MIF_SPLASH;
348 CSQCProjectile(proj, true, PROJECTILE_ROCKETMINSTA_LASER, true);
350 MUTATOR_CALLHOOK(EditProjectile, actor, proj);
355 METHOD(Vaporizer, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
357 if(actor.(thiswep.ammo_field) > 0)
358 PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 1, false);
360 PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), false); // WEAPONTODO: replace with proper vaporizer cvars
362 METHOD(Vaporizer, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
364 float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
365 // if the laser uses load, we also consider its ammo for reloading
366 if(WEP_CVAR(vaporizer, reload_ammo) && WEP_CVAR_SEC(vaporizer, ammo) && actor.(weaponentity).clip_load < min(vaporizer_ammo, WEP_CVAR_SEC(vaporizer, ammo))) { // forced reload
367 thiswep.wr_reload(thiswep, actor, weaponentity);
368 } else if(WEP_CVAR(vaporizer, reload_ammo) && actor.(weaponentity).clip_load < vaporizer_ammo) { // forced reload
369 thiswep.wr_reload(thiswep, actor, weaponentity);
371 if((fire & 1) && (actor.ammo_cells || !autocvar_g_rm) && !forbidWeaponUse(actor))
373 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(vaporizer, refire)))
375 W_Vaporizer_Attack(thiswep, actor, weaponentity);
376 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(vaporizer, animtime), w_ready);
379 if((fire & 2) || ((fire & 1) && !actor.ammo_cells && autocvar_g_rm))
381 if((autocvar_g_rm && autocvar_g_rm_laser) || autocvar_g_rm_laser == 2)
383 bool rapid = autocvar_g_rm_laser_rapid;
384 if(actor.(weaponentity).jump_interval <= time && !actor.(weaponentity).held_down)
387 actor.(weaponentity).held_down = true;
388 actor.(weaponentity).jump_interval = time + autocvar_g_rm_laser_refire;
389 actor.(weaponentity).jump_interval2 = time + autocvar_g_rm_laser_rapid_delay;
391 W_RocketMinsta_Attack2(actor, weaponentity);
393 else if(rapid && actor.(weaponentity).jump_interval2 <= time && actor.(weaponentity).held_down)
395 actor.(weaponentity).jump_interval2 = time + autocvar_g_rm_laser_rapid_refire;
397 W_RocketMinsta_Attack3(actor, weaponentity);
398 //weapon_thinkf(actor, WFRAME_FIRE2, autocvar_g_rm_laser_rapid_animtime, w_ready);
401 else if (actor.(weaponentity).jump_interval <= time)
403 // handle refire manually, so that primary and secondary can be fired without conflictions (important for instagib)
404 actor.(weaponentity).jump_interval = time + WEP_CVAR_SEC(vaporizer, refire) * W_WeaponRateFactor(actor);
406 // decrease ammo for the laser?
407 if(WEP_CVAR_SEC(vaporizer, ammo))
408 W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(vaporizer, ammo), weaponentity);
410 // ugly instagib hack to reuse the fire mode of the laser
411 makevectors(actor.v_angle);
412 Weapon oldwep = actor.(weaponentity).m_weapon; // we can't avoid this hack
413 actor.(weaponentity).m_weapon = WEP_BLASTER;
417 WEP_BLASTER.m_id | HITTYPE_SECONDARY,
418 WEP_CVAR_SEC(vaporizer, shotangle),
419 WEP_CVAR_SEC(vaporizer, damage),
420 WEP_CVAR_SEC(vaporizer, edgedamage),
421 WEP_CVAR_SEC(vaporizer, radius),
422 WEP_CVAR_SEC(vaporizer, force),
423 WEP_CVAR_SEC(vaporizer, speed),
424 WEP_CVAR_SEC(vaporizer, spread),
425 WEP_CVAR_SEC(vaporizer, delay),
426 WEP_CVAR_SEC(vaporizer, lifetime)
428 actor.(weaponentity).m_weapon = oldwep;
430 // now do normal refire
431 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);
435 actor.(weaponentity).held_down = false;
437 METHOD(Vaporizer, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
439 actor.vaporizer_lasthit = 0;
441 METHOD(Vaporizer, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
443 float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
444 float ammo_amount = actor.(thiswep.ammo_field) >= vaporizer_ammo;
445 ammo_amount += actor.(weaponentity).(weapon_load[WEP_VAPORIZER.m_id]) >= vaporizer_ammo;
448 METHOD(Vaporizer, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
450 if(!WEP_CVAR_SEC(vaporizer, ammo))
452 float ammo_amount = actor.(thiswep.ammo_field) >= WEP_CVAR_SEC(vaporizer, ammo);
453 ammo_amount += actor.(weaponentity).(weapon_load[WEP_VAPORIZER.m_id]) >= WEP_CVAR_SEC(vaporizer, ammo);
456 METHOD(Vaporizer, wr_resetplayer, void(entity thiswep, entity actor))
458 actor.vaporizer_lasthit = 0;
460 METHOD(Vaporizer, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
462 float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
464 if(WEP_CVAR_SEC(vaporizer, ammo))
465 used_ammo = min(vaporizer_ammo, WEP_CVAR_SEC(vaporizer, ammo));
467 used_ammo = vaporizer_ammo;
469 W_Reload(actor, weaponentity, used_ammo, SND_RELOAD);
471 METHOD(Vaporizer, wr_suicidemessage, Notification(entity thiswep))
473 return WEAPON_THINKING_WITH_PORTALS;
475 METHOD(Vaporizer, wr_killmessage, Notification(entity thiswep))
477 return WEAPON_VAPORIZER_MURDER;
483 METHOD(Vaporizer, wr_impacteffect, void(entity thiswep, entity actor))
485 vector org2 = w_org + w_backoff * 6;
486 if(w_deathtype & HITTYPE_SECONDARY)
488 pointparticles(EFFECT_BLASTER_IMPACT, org2, w_backoff * 1000, 1);
489 if(!w_issilent) { sound(actor, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM); }
493 pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1);
494 if(!w_issilent) { sound(actor, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); }
497 METHOD(Vaporizer, wr_init, void(entity thiswep))
499 if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
501 precache_pic("gfx/reticle_nex");
504 METHOD(Vaporizer, wr_zoom, bool(entity thiswep, entity actor))
506 if(button_zoom || zoomscript_caught)
512 // no weapon specific image for this weapon