]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/weapons/weapon/vaporizer.qc
Merge branch 'master' into Lyberta/KillSound
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / vaporizer.qc
1 #include "vaporizer.qh"
2
3 REGISTER_NET_TEMP(TE_CSQC_VAPORBEAMPARTICLE)
4
5 #if defined(SVQC)
6 void SendCSQCVaporizerBeamParticle(entity player, int hit) {
7         vector v;
8         v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
9         WriteHeader(MSG_BROADCAST, TE_CSQC_VAPORBEAMPARTICLE);
10         WriteCoord(MSG_BROADCAST, w_shotorg.x);
11         WriteCoord(MSG_BROADCAST, w_shotorg.y);
12         WriteCoord(MSG_BROADCAST, w_shotorg.z);
13         WriteCoord(MSG_BROADCAST, v.x);
14         WriteCoord(MSG_BROADCAST, v.y);
15         WriteCoord(MSG_BROADCAST, v.z);
16         WriteByte(MSG_BROADCAST, hit);
17         WriteByte(MSG_BROADCAST, etof(player));
18         WriteByte(MSG_BROADCAST, player.team);
19 }
20 #elif defined(CSQC)
21 bool autocvar_cl_vaporizerbeam_particle = false;
22 float autocvar_cl_vaporizerbeam_lifetime = 0.8;
23 float autocvar_cl_vaporizerbeam_colorboost = 0.7;
24
25 string Draw_VaporizerBeam_trace_callback_tex;
26 float Draw_VaporizerBeam_trace_callback_rnd;
27 vector Draw_VaporizerBeam_trace_callback_rgb;
28 float Draw_VaporizerBeam_trace_callback_a;
29 void Draw_VaporizerBeam_trace_callback(vector start, vector hit, vector end)
30 {
31         float i;
32         vector vorg;
33         vorg = WarpZone_TransformOrigin(WarpZone_trace_transform, view_origin);
34         for(i = 0; i < Draw_VaporizerBeam_trace_callback_a; ++i)
35                 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);
36         Draw_VaporizerBeam_trace_callback_rnd += 0.25 * vlen(hit - start) / 8;
37 }
38
39 .vector vorg1, vorg2;
40 .float spawn_time;
41 void VaporizerBeam_Draw(entity this)
42 {
43         //draw either the old v2.3 beam or the new beam
44         particles_alphamin = particles_alphamax = particles_fade = 1;
45
46         string tex = "particles/lgbeam";
47         if(this.cnt)
48                 tex = "particles/gauntletbeam";
49         vector rgb;
50         //entity e = CSQCModel_server2csqc(this.sv_entnum - 1);
51         //if (e == NULL)
52         //{
53                 rgb = colormapPaletteColor(entcs_GetClientColors(this.sv_entnum - 1) & 0x0F, true);
54                 //rgb = '1 1 1';
55         //}
56         //else
57         //      rgb = e.glowmod;
58         rgb *= (1 + autocvar_cl_vaporizerbeam_colorboost);
59
60         float fail = (this.nextthink - time);
61
62         Draw_VaporizerBeam_trace_callback_tex = tex;
63         Draw_VaporizerBeam_trace_callback_rnd = 0;
64         Draw_VaporizerBeam_trace_callback_rgb = rgb;
65         Draw_VaporizerBeam_trace_callback_a = bound(0, fail, 1);
66         WarpZone_TraceBox_ThroughZone(this.vorg1, '0 0 0', '0 0 0', this.vorg2, MOVE_NOTHING, NULL, NULL, Draw_VaporizerBeam_trace_callback);
67         Draw_VaporizerBeam_trace_callback_tex = string_null;
68
69         /*if(!MUTATOR_CALLHOOK(Particles_VaporizerBeam, this.vorg1, this.vorg2))
70         if(autocvar_cl_particles_oldvortexbeam && (STAT(ALLOW_OLDVORTEXBEAM) || isdemo()))
71                 WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), this.vorg1, this.vorg2, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
72         else
73                 WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM), this.vorg1, this.vorg2, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);*/
74 }
75
76 NET_HANDLE(TE_CSQC_VAPORBEAMPARTICLE, bool isNew)
77 {
78         Net_Accept(vortex_beam);
79         setthink(this, SUB_Remove);
80         this.nextthink = time + bound(0, autocvar_cl_vaporizerbeam_lifetime, 10);
81         this.draw = VaporizerBeam_Draw;
82         if (isNew) IL_PUSH(g_drawables, this);
83         this.drawmask = MASK_NORMAL;
84
85         this.vorg1_x = ReadCoord(); this.vorg1_y = ReadCoord(); this.vorg1_z = ReadCoord();
86         this.vorg2_x = ReadCoord(); this.vorg2_y = ReadCoord(); this.vorg2_z = ReadCoord();
87         this.cnt = ReadByte();
88         int myowner = ReadByte();
89         this.owner = playerslots[myowner - 1];
90         this.sv_entnum = myowner;
91         this.team = ReadByte() - 1;
92
93         pointparticles(EFFECT_VORTEX_MUZZLEFLASH, this.vorg1, normalize(this.vorg2 - this.vorg1) * 1000, 1);
94
95         if(autocvar_cl_vaporizerbeam_particle)
96         {
97                 WarpZone_TrailParticles(NULL, particleeffectnum(((this.cnt) ? EFFECT_VAPORIZER_HIT(this.team) : EFFECT_VAPORIZER(this.team))), this.vorg1, this.vorg2);
98                 this.draw = func_null;
99                 this.drawmask = MASK_NORMAL;
100                 delete(this);
101         }
102
103         return true;
104 }
105 #endif
106
107 #ifdef SVQC
108
109 void W_RocketMinsta_Explosion(entity actor, vector loc)
110 {
111         if(accuracy_canbegooddamage(actor))
112                 accuracy_add(actor, WEP_DEVASTATOR.m_id, autocvar_g_rm_damage, 0);
113         entity dmgent = spawn();
114         dmgent.owner = dmgent.realowner = actor;
115         setorigin(dmgent, loc);
116         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, NULL);
117         delete(dmgent);
118 }
119
120 void W_Vaporizer_Attack(Weapon thiswep, entity actor, .entity weaponentity)
121 {
122         bool flying = IsFlying(actor); // do this BEFORE to make the trace values from FireRailgunBullet last
123         float vaporizer_damage = ((WEP_CVAR_PRI(vaporizer, damage) > 0) ? WEP_CVAR_PRI(vaporizer, damage) : 10000);
124
125         W_SetupShot(actor, weaponentity, true, 0, SND_Null, CH_WEAPON_A, vaporizer_damage);
126         // handle sound separately so we can change the volume
127         // added bonus: no longer plays the strength sound (strength gives no bonus to instakill anyway)
128         sound (actor, CH_WEAPON_A, SND_MINSTANEXFIRE, VOL_BASE * 0.8, ATTEN_NORM);
129
130         yoda = 0;
131         damage_goodhits = 0;
132         FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, vaporizer_damage, 800, 0, 0, 0, 0, WEP_VAPORIZER.m_id);
133
134         // do this now, as goodhits is disabled below
135         SendCSQCVaporizerBeamParticle(actor, damage_goodhits);
136
137         if(yoda && flying)
138                 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
139         if(damage_goodhits && actor.vaporizer_lasthit)
140         {
141                 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
142                 damage_goodhits = 0; // only every second time
143         }
144
145         actor.vaporizer_lasthit = damage_goodhits;
146
147         if(autocvar_g_rm)
148         if(!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT)))
149                 W_RocketMinsta_Explosion(actor, trace_endpos);
150
151         W_DecreaseAmmo(thiswep, actor, ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo)), weaponentity);
152 }
153
154 void W_RocketMinsta_Laser_Explode (entity this, entity directhitentity)
155 {
156         if(directhitentity.takedamage == DAMAGE_AIM)
157                 if(IS_PLAYER(directhitentity))
158                         if(DIFF_TEAM(this.realowner, directhitentity))
159                                 if(!IS_DEAD(directhitentity))
160                                         if(IsFlying(directhitentity))
161                                                 Send_Notification(NOTIF_ONE, this.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH);
162
163         this.event_damage = func_null;
164         this.takedamage = DAMAGE_NO;
165         RadiusDamage (this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, directhitentity);
166         delete(this);
167 }
168
169 void W_RocketMinsta_Laser_Explode_use(entity this, entity actor, entity trigger)
170 {
171         W_RocketMinsta_Laser_Explode(this, trigger); // we probably don't want trigger used here, but this matches closest to old behaviour
172 }
173
174 void W_RocketMinsta_Laser_Touch(entity this, entity toucher)
175 {
176         PROJECTILE_TOUCH(this, toucher);
177         //W_RocketMinsta_Laser_Explode ();
178         RadiusDamage(this, this.realowner, this.rm_damage, this.rm_edmg, autocvar_g_rm_laser_radius, NULL, NULL, this.rm_force, this.projectiledeathtype, toucher);
179         delete(this);
180 }
181
182 void W_RocketMinsta_Attack2(entity actor, .entity weaponentity)
183 {
184         makevectors(actor.v_angle);
185
186         entity proj;
187         float counter = 0;
188         float total = autocvar_g_rm_laser_count;
189         float spread = autocvar_g_rm_laser_spread;
190         float rndspread = autocvar_g_rm_laser_spread_random;
191
192         Weapon w = actor.(weaponentity).m_weapon;
193         actor.(weaponentity).m_weapon = WEP_ELECTRO;
194         W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, autocvar_g_rm_laser_damage);
195         actor.(weaponentity).m_weapon = w;
196
197         Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
198
199     while(counter < total)
200         {
201         proj = new(plasma_prim);
202         proj.owner = proj.realowner = actor;
203         proj.bot_dodge = true;
204         proj.bot_dodgerating = autocvar_g_rm_laser_damage;
205         proj.use = W_RocketMinsta_Laser_Explode_use;
206         setthink(proj, adaptor_think2use_hittype_splash);
207         proj.nextthink = time + autocvar_g_rm_laser_lifetime;
208         PROJECTILE_MAKETRIGGER(proj);
209         proj.projectiledeathtype = WEP_ELECTRO.m_id;
210         setorigin(proj, w_shotorg);
211
212                 proj.rm_force = autocvar_g_rm_laser_force / total;
213                 proj.rm_damage = autocvar_g_rm_laser_damage / total;
214                 proj.rm_edmg = proj.rm_damage;
215
216         //W_SetupProjectileVelocity(proj, autocvar_g_rm_laser_speed, spread * (rndspread ? random() : 1) * autocvar_g_rm_laser_speed);
217
218         set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
219         //W_SETUPPROJECTILEVELOCITY(proj, g_balance_minstanex_laser);
220                 proj.velocity = (w_shotdir + (((counter + 0.5) / total) * 2 - 1) * v_right * (spread * (rndspread ? random() : 1))) * cvar("g_rm_laser_speed");
221                 proj.velocity_z = proj.velocity_z + cvar("g_rm_laser_zspread") * (random() - 0.5);
222                 proj.velocity = W_CalculateProjectileVelocity(actor, actor.velocity, proj.velocity, true);
223         proj.angles = vectoangles(proj.velocity);
224         settouch(proj, W_RocketMinsta_Laser_Touch);
225         setsize(proj, '0 0 -3', '0 0 -3');
226         proj.flags = FL_PROJECTILE;
227         IL_PUSH(g_projectiles, proj);
228         IL_PUSH(g_bot_dodge, proj);
229         proj.missile_flags = MIF_SPLASH;
230
231         CSQCProjectile(proj, true, PROJECTILE_ROCKETMINSTA_LASER, true);
232
233         MUTATOR_CALLHOOK(EditProjectile, actor, proj);
234         counter++;
235     }
236 }
237
238 void W_RocketMinsta_Attack3 (entity actor, .entity weaponentity)
239 {
240         makevectors(actor.v_angle);
241
242         entity proj;
243         float counter = 0;
244         float total = 1;
245
246         Weapon w = actor.(weaponentity).m_weapon;
247         actor.(weaponentity).m_weapon = WEP_ELECTRO;
248         W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_ELECTRO_FIRE2, CH_WEAPON_A, autocvar_g_rm_laser_damage);
249         actor.(weaponentity).m_weapon = w;
250
251         Send_Effect(EFFECT_ELECTRO_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
252
253     while(counter < total)
254         {
255         proj = new(plasma_prim);
256         proj.owner = proj.realowner = actor;
257         proj.bot_dodge = true;
258         proj.bot_dodgerating = autocvar_g_rm_laser_damage;
259         proj.use = W_RocketMinsta_Laser_Explode_use;
260         setthink(proj, adaptor_think2use_hittype_splash);
261         proj.nextthink = time + autocvar_g_rm_laser_lifetime;
262         PROJECTILE_MAKETRIGGER(proj);
263         proj.projectiledeathtype = WEP_ELECTRO.m_id;
264         setorigin(proj, w_shotorg);
265
266                 proj.rm_force = autocvar_g_rm_laser_force / total;
267                 proj.rm_damage = autocvar_g_rm_laser_damage / total;
268                 proj.rm_edmg = proj.rm_damage;
269
270         //W_SetupProjectileVelocity(proj, autocvar_g_rm_laser_speed, spread * (rndspread ? random() : 1) * autocvar_g_rm_laser_speed);
271
272         set_movetype(proj, MOVETYPE_BOUNCEMISSILE);
273                 proj.velocity = w_shotdir * autocvar_g_rm_laser_speed;
274                 proj.velocity = W_CalculateProjectileVelocity(actor, actor.velocity, proj.velocity, true);
275         proj.angles = vectoangles(proj.velocity);
276         settouch(proj, W_RocketMinsta_Laser_Touch);
277         setsize(proj, '0 0 -3', '0 0 -3');
278         proj.flags = FL_PROJECTILE;
279         IL_PUSH(g_projectiles, proj);
280         IL_PUSH(g_bot_dodge, proj);
281         proj.missile_flags = MIF_SPLASH;
282
283         CSQCProjectile(proj, true, PROJECTILE_ROCKETMINSTA_LASER, true);
284
285         MUTATOR_CALLHOOK(EditProjectile, actor, proj);
286         counter++;
287     }
288 }
289
290 METHOD(Vaporizer, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
291 {
292     if(GetResourceAmount(actor, thiswep.ammo_type) > 0)
293         PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 1, false);
294     else
295         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
296 }
297 METHOD(Vaporizer, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
298 {
299     float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
300     // if the laser uses load, we also consider its ammo for reloading
301     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
302         thiswep.wr_reload(thiswep, actor, weaponentity);
303     } else if(WEP_CVAR(vaporizer, reload_ammo) && actor.(weaponentity).clip_load < vaporizer_ammo) { // forced reload
304         thiswep.wr_reload(thiswep, actor, weaponentity);
305     }
306     if((fire & 1) && (actor.ammo_cells || !autocvar_g_rm) && !forbidWeaponUse(actor))
307     {
308         if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(vaporizer, refire)))
309         {
310             W_Vaporizer_Attack(thiswep, actor, weaponentity);
311             weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(vaporizer, animtime), w_ready);
312         }
313     }
314     if((fire & 2) || ((fire & 1) && !actor.ammo_cells && autocvar_g_rm))
315     {
316         if((autocvar_g_rm && autocvar_g_rm_laser) || autocvar_g_rm_laser == 2)
317         {
318             bool rapid = autocvar_g_rm_laser_rapid;
319             if(actor.(weaponentity).jump_interval <= time && !actor.(weaponentity).held_down)
320             {
321                 if(rapid)
322                     actor.(weaponentity).held_down = true;
323                 actor.(weaponentity).jump_interval = time + autocvar_g_rm_laser_refire;
324                 actor.(weaponentity).jump_interval2 = time + autocvar_g_rm_laser_rapid_delay;
325                 damage_goodhits = 0;
326                 W_RocketMinsta_Attack2(actor, weaponentity);
327             }
328             else if(rapid && actor.(weaponentity).jump_interval2 <= time && actor.(weaponentity).held_down)
329             {
330                 actor.(weaponentity).jump_interval2 = time + autocvar_g_rm_laser_rapid_refire;
331                 damage_goodhits = 0;
332                 W_RocketMinsta_Attack3(actor, weaponentity);
333                 //weapon_thinkf(actor, WFRAME_FIRE2, autocvar_g_rm_laser_rapid_animtime, w_ready);
334             }
335         }
336         else if (actor.(weaponentity).jump_interval <= time)
337         {
338             // handle refire manually, so that primary and secondary can be fired without conflictions (important for instagib)
339             actor.(weaponentity).jump_interval = time + WEP_CVAR_SEC(vaporizer, refire) * W_WeaponRateFactor(actor);
340
341             // decrease ammo for the laser?
342             if(WEP_CVAR_SEC(vaporizer, ammo))
343                 W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(vaporizer, ammo), weaponentity);
344
345             // ugly instagib hack to reuse the fire mode of the laser
346             makevectors(actor.v_angle);
347             Weapon oldwep = actor.(weaponentity).m_weapon; // we can't avoid this hack
348             actor.(weaponentity).m_weapon = WEP_BLASTER;
349             W_Blaster_Attack(
350                 actor,
351                 weaponentity,
352                 WEP_BLASTER.m_id | HITTYPE_SECONDARY,
353                 WEP_CVAR_SEC(vaporizer, shotangle),
354                 WEP_CVAR_SEC(vaporizer, damage),
355                 WEP_CVAR_SEC(vaporizer, edgedamage),
356                 WEP_CVAR_SEC(vaporizer, radius),
357                 WEP_CVAR_SEC(vaporizer, force),
358                 WEP_CVAR_SEC(vaporizer, speed),
359                 WEP_CVAR_SEC(vaporizer, spread),
360                 WEP_CVAR_SEC(vaporizer, delay),
361                 WEP_CVAR_SEC(vaporizer, lifetime)
362             );
363             actor.(weaponentity).m_weapon = oldwep;
364
365             // now do normal refire
366             weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(vaporizer, animtime), w_ready);
367         }
368     }
369     else
370         actor.(weaponentity).held_down = false;
371 }
372 METHOD(Vaporizer, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
373 {
374     actor.vaporizer_lasthit = 0;
375 }
376 METHOD(Vaporizer, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
377 {
378     float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
379     float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= vaporizer_ammo;
380     ammo_amount += actor.(weaponentity).(weapon_load[WEP_VAPORIZER.m_id]) >= vaporizer_ammo;
381     return ammo_amount;
382 }
383 METHOD(Vaporizer, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
384 {
385     if(!WEP_CVAR_SEC(vaporizer, ammo))
386         return true;
387     float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(vaporizer, ammo);
388     ammo_amount += actor.(weaponentity).(weapon_load[WEP_VAPORIZER.m_id]) >= WEP_CVAR_SEC(vaporizer, ammo);
389     return ammo_amount;
390 }
391 METHOD(Vaporizer, wr_resetplayer, void(entity thiswep, entity actor))
392 {
393     actor.vaporizer_lasthit = 0;
394 }
395 METHOD(Vaporizer, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
396 {
397     float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
398     float used_ammo;
399     if(WEP_CVAR_SEC(vaporizer, ammo))
400         used_ammo = min(vaporizer_ammo, WEP_CVAR_SEC(vaporizer, ammo));
401     else
402         used_ammo = vaporizer_ammo;
403
404     W_Reload(actor, weaponentity, used_ammo, SND_RELOAD);
405 }
406 METHOD(Vaporizer, wr_suicidemessage, Notification(entity thiswep))
407 {
408     return WEAPON_THINKING_WITH_PORTALS;
409 }
410 METHOD(Vaporizer, wr_killmessage, Notification(entity thiswep))
411 {
412     return WEAPON_VAPORIZER_MURDER;
413 }
414
415 #endif
416 #ifdef CSQC
417
418 METHOD(Vaporizer, wr_impacteffect, void(entity thiswep, entity actor))
419 {
420     vector org2 = w_org + w_backoff * 6;
421     if(w_deathtype & HITTYPE_SECONDARY)
422     {
423         pointparticles(EFFECT_BLASTER_IMPACT, org2, w_backoff * 1000, 1);
424         if(!w_issilent) { sound(actor, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM); }
425     }
426     else
427     {
428         pointparticles(EFFECT_VORTEX_IMPACT, org2, '0 0 0', 1);
429         if(!w_issilent) { sound(actor, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); }
430     }
431 }
432 METHOD(Vaporizer, wr_init, void(entity thiswep))
433 {
434     if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
435     {
436         precache_pic("gfx/reticle_nex");
437     }
438 }
439 METHOD(Vaporizer, wr_zoom, bool(entity thiswep, entity actor))
440 {
441     if(button_zoom || zoomscript_caught)
442     {
443         return true;
444     }
445     else
446     {
447         // no weapon specific image for this weapon
448         return false;
449     }
450 }
451
452 #endif