2 void W_UpdateAmmo (void)
4 self.items = self.items - (self.items & (IT_NAILS | IT_SHELLS | IT_ROCKETS | IT_CELLS));
6 if (self.weapon == IT_LASER)
8 else if (self.weapon == IT_UZI)
10 self.currentammo = self.ammo_nails;
11 self.items = self.items | IT_NAILS;
13 else if (self.weapon == IT_SHOTGUN)
15 self.currentammo = self.ammo_shells;
16 self.items = self.items | IT_SHELLS;
18 else if (self.weapon == IT_GRENADE_LAUNCHER || self.weapon == IT_HAGAR || self.weapon == IT_ROCKET_LAUNCHER)
20 self.currentammo = self.ammo_rockets;
21 self.items = self.items | IT_ROCKETS;
23 else if (self.weapon == IT_ELECTRO || self.weapon == IT_NEX || self.weapon == IT_CRYLINK)
25 self.currentammo = self.ammo_cells;
26 self.items = self.items | IT_CELLS;
30 void W_UpdateWeapon (void)
32 if (self.weapon == IT_LASER)
33 self.weaponmodel = "models/weapons/w_lazer.zym";
34 else if (self.weapon == IT_UZI)
35 self.weaponmodel = "models/weapons/w_uzi.md3";
36 else if (self.weapon == IT_SHOTGUN)
37 self.weaponmodel = "models/weapons/w_shotgun.md3";
38 else if (self.weapon == IT_GRENADE_LAUNCHER)
39 self.weaponmodel = "models/weapons/w_gl.md3";
40 else if (self.weapon == IT_ELECTRO)
41 self.weaponmodel = "models/weapons/w_electro.md3";
42 else if (self.weapon == IT_CRYLINK)
43 self.weaponmodel = "models/weapons/w_crylink.md3";
44 else if (self.weapon == IT_NEX)
45 self.weaponmodel = "models/weapons/w_nex.md3";
46 else if (self.weapon == IT_HAGAR)
47 self.weaponmodel = "models/weapons/w_hagar.md3";
48 else if (self.weapon == IT_ROCKET_LAUNCHER)
49 self.weaponmodel = "models/weapons/w_rl.md3";
51 objerror ("Illegal weapon - please register your guns please!");
54 float W_GetBestWeapon (void)
56 if ((self.items & IT_ROCKET_LAUNCHER) && self.ammo_rockets)
57 return IT_ROCKET_LAUNCHER;
58 else if ((self.items & IT_HAGAR) && self.ammo_rockets)
60 else if ((self.items & IT_NEX) && self.ammo_cells)
62 else if ((self.items & IT_CRYLINK) && self.ammo_cells)
64 else if ((self.items & IT_ELECTRO) && self.ammo_cells)
66 else if ((self.items & IT_GRENADE_LAUNCHER) && self.ammo_rockets)
67 return IT_GRENADE_LAUNCHER;
68 else if ((self.items & IT_SHOTGUN) && self.ammo_shells)
70 else if ((self.items & IT_UZI) && self.ammo_nails)
76 void W_GiveWeapon (entity e, float wep) // FIXME - make it 'smarter'
85 e.items = e.items | wep;
98 void W_SwitchWeapon (float wep)
101 var float noammo = FALSE;
108 if (!self.ammo_nails)
113 nextwep = IT_SHOTGUN;
114 if (!self.ammo_shells)
119 nextwep = IT_GRENADE_LAUNCHER;
120 if (!self.ammo_rockets)
125 nextwep = IT_ELECTRO;
126 if (!self.ammo_cells)
131 nextwep = IT_CRYLINK;
132 if (!self.ammo_cells)
138 if (!self.ammo_cells)
144 if (!self.ammo_rockets)
149 nextwep = IT_ROCKET_LAUNCHER;
150 if (!self.ammo_rockets)
155 if (!(self.items & nextwep))
157 sprint (self, "You don't own that weapon\n");
162 sprint (self, "You don't have any ammo for that weapon\n");
166 self.weapon = nextwep;
169 self.attack_finished = time + 0.2;
170 if (self.viewzoom != 1)
174 void W_NextWeapon (void)
182 if (self.weapon == IT_CRYLINK)
183 self.weapon = IT_LASER;
184 else if (self.weapon == IT_LASER)
186 self.weapon = IT_UZI;
187 if (!self.ammo_nails)
190 else if (self.weapon == IT_UZI)
192 self.weapon = IT_SHOTGUN;
193 if (!self.ammo_shells)
196 else if (self.weapon == IT_SHOTGUN)
198 self.weapon = IT_GRENADE_LAUNCHER;
199 if (!self.ammo_rockets)
202 else if (self.weapon == IT_GRENADE_LAUNCHER)
204 self.weapon = IT_ELECTRO;
205 if (!self.ammo_cells)
208 else if (self.weapon == IT_ELECTRO)
210 self.weapon = IT_CRYLINK;
211 if (!self.ammo_cells)
214 else if (self.weapon == IT_CRYLINK)
216 self.weapon = IT_NEX;
217 if (!self.ammo_cells)
220 else if (self.weapon == IT_NEX)
222 self.weapon = IT_HAGAR;
223 if (!self.ammo_rockets)
226 else if (self.weapon == IT_HAGAR)
228 self.weapon = IT_ROCKET_LAUNCHER;
229 if (!self.ammo_rockets)
233 if ((self.items & self.weapon) && !noammo)
242 void W_PreviousWeapon (void)
250 if (self.weapon == IT_UZI)
251 self.weapon = IT_LASER;
252 else if (self.weapon == IT_SHOTGUN)
254 self.weapon = IT_UZI;
255 if (!self.ammo_nails)
258 else if (self.weapon == IT_GRENADE_LAUNCHER)
260 self.weapon = IT_SHOTGUN;
261 if (!self.ammo_shells)
264 else if (self.weapon == IT_ELECTRO)
266 self.weapon = IT_GRENADE_LAUNCHER;
267 if (!self.ammo_rockets)
270 else if (self.weapon == IT_CRYLINK)
272 self.weapon = IT_ELECTRO;
273 if (!self.ammo_cells)
276 else if (self.weapon == IT_NEX)
278 self.weapon = IT_CRYLINK;
279 if (!self.ammo_cells)
282 else if (self.weapon == IT_HAGAR)
284 self.weapon = IT_NEX;
285 if (!self.ammo_cells)
288 else if (self.weapon == IT_ROCKET_LAUNCHER)
290 self.weapon = IT_HAGAR;
291 if (!self.ammo_rockets)
294 else if (self.weapon == IT_LASER)
296 self.weapon = IT_ROCKET_LAUNCHER;
297 if (!self.ammo_rockets)
301 if ((self.items & self.weapon) && !noammo)
310 float W_CheckAmmo (void)
313 if (self.weapon == IT_LASER)
315 else if (self.currentammo)
318 self.weapon = W_GetBestWeapon ();
324 void W_Laser_Touch (void)
328 if (other == self.owner)
330 else if (pointcontents (self.origin) == CONTENT_SKY)
336 dir = normalize (self.owner.origin - self.origin);
338 sound (self, CHAN_BODY, "weapons/NexImpact.wav", 1, ATTN_NORM);
340 WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
341 WriteByte (MSG_BROADCAST, 79);
342 WriteCoord (MSG_BROADCAST, self.origin_x);
343 WriteCoord (MSG_BROADCAST, self.origin_y);
344 WriteCoord (MSG_BROADCAST, self.origin_z);
345 WriteCoord (MSG_BROADCAST, dir_x);
346 WriteCoord (MSG_BROADCAST, dir_y);
347 WriteCoord (MSG_BROADCAST, dir_z);
348 WriteByte (MSG_BROADCAST, 155);
353 void W_Laser_Attack (void)
357 sound (self, CHAN_WEAPON, "weapons/Electro_fire.wav", 1, ATTN_NORM);
360 missile.owner = self;
361 missile.classname = "laser";
363 missile.movetype = MOVETYPE_FLY;
364 missile.solid = SOLID_BBOX;
366 setmodel (missile, "models/bullet.mdl");
367 setsize (missile, '-4 -4 -4', '4 4 4');
368 setorigin (missile, self.origin + self.view_ofs);
370 makevectors (self.v_angle);
371 missile.velocity = v_forward * 2000;
372 missile.angles = vectoangles (missile.velocity);
373 missile.glow_color = 250; // 244, 250
374 missile.glow_size = 1020;
375 missile.glow_trail = 1; // ??? 256
376 missile.touch = W_Laser_Touch;
377 missile.think = SUB_Remove;
378 missile.nextthink = time + 2;
380 self.punchangle_x = random () - 0.5;
381 self.punchangle_y = random () - 0.5;
382 self.punchangle_z = random () - 0.5;
384 self.attack_finished = time + 0.3;
387 void W_Laser_Attack2 (void)
392 void W_Uzi_Attack (void)
396 sound (self, CHAN_WEAPON, "weapons/Uzi_Fire.wav", 1, ATTN_NORM);
398 makevectors (self.v_angle);
400 // use traceline_hitcorpse to make sure it can hit gibs and corpses too
401 org = self.origin + self.view_ofs;
402 traceline_hitcorpse (self, org, org + v_forward * 4096 + v_right * crandom () * 300 + v_up * crandom () * 300, FALSE, self);
404 // FIXME - causes excessive 'tinking'. Hopefully remove "tink1.wav" from the ricochets with csqc
405 if ((trace_fraction != 1.0) && (trace_ent != self) && (pointcontents (trace_endpos) != CONTENT_SKY))
407 if (trace_ent == world)
408 te_spike (trace_endpos);
409 else if (trace_ent.classname == "player" || trace_ent.classname == "corpse" || trace_ent.classname == "gib")
411 Damage (self, trace_endpos, trace_ent, 0, 8);
413 sound (trace_ent, CHAN_IMPACT, "misc/BodyImpact1.wav", 1, ATTN_NORM);
415 sound (trace_ent, CHAN_IMPACT, "misc/BodyImpact2.wav", 1, ATTN_NORM);
419 self.punchangle_x = random () * -2;
420 self.punchangle_y = crandom () * 0.5;
421 self.punchangle_z = crandom () * 0.5;
423 self.attack_finished = time + 0.075;
424 self.ammo_nails = self.ammo_nails - 1;
427 void W_Uzi_Attack2 (void)
431 sound (self, CHAN_WEAPON, "weapons/Uzi_Fire.wav", 1, ATTN_NORM);
433 makevectors (self.v_angle);
435 // use traceline_hitcorpse to make sure it can hit gibs and corpses too
436 org = self.origin + self.view_ofs;
437 traceline_hitcorpse (self, org, org + v_forward * 8192, FALSE, self);
439 if ((trace_fraction != 1.0) && (trace_ent != self) && (pointcontents (trace_endpos) != CONTENT_SKY))
441 if (trace_ent == world)
442 te_spike (trace_endpos);
443 else if (trace_ent.classname == "player" || trace_ent.classname == "corpse" || trace_ent.classname == "gib")
445 Damage (self, trace_endpos, trace_ent, 0, 12);
447 sound (trace_ent, CHAN_IMPACT, "misc/BodyImpact1.wav", 1, ATTN_NORM);
449 sound (trace_ent, CHAN_IMPACT, "misc/BodyImpact2.wav", 1, ATTN_NORM);
453 self.punchangle = '-0.5 0 0';
455 self.attack_finished = time + 0.3;
456 self.ammo_nails = self.ammo_nails - 1;
459 // Don't shoot this weapon, it crashes :)
460 void W_Shotgun_Attack (void)
462 sound (self, CHAN_WEAPON, "weapons/Shotgun_fire.wav", 1, ATTN_NORM);
464 self.punchangle_x = -2;
466 makevectors (self.v_angle);
467 FireBullets (6, v_forward, '0.04 0.04 0');
469 self.attack_finished = time + 0.8;
472 void W_Shotgun_Attack2 (void)
477 void W_Grenade_Explode (entity ignore)
479 ImpactEffect (self, IT_GRENADE_LAUNCHER);
481 RadiusDamage (self.owner, self, 0, 100, world);
486 void W_Grenade_FuseExplode (void)
488 W_Grenade_Explode (world);
491 void W_Grenade_Touch (void)
493 if (other.classname == "player" || other.classname == "corpse")
495 Damage (self.owner, self.origin, other, 0, 100);
496 W_Grenade_Explode (other);
499 sound (self, CHAN_BODY, "weapons/Grenade_Bounce.wav", 1, ATTN_NORM);
502 void W_Grenade_Attack (void)
506 sound (self, CHAN_WEAPON, "weapons/Grenade_fire.wav", 1, ATTN_NORM);
508 self.punchangle_x = -4;
512 gren.classname = "grenade";
514 gren.movetype = MOVETYPE_BOUNCE;
515 gren.solid = SOLID_BBOX;
517 gren.takedamage = DAMAGE_YES;
519 gren.event_hurt = W_Grenade_Explode;
521 setmodel (gren, "models/grenademodel.md3");
522 setsize (gren, '0 0 0', '0 0 0');
524 makevectors (self.v_angle);
525 setorigin (gren, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -12);
527 gren.velocity = v_forward * 900 + v_up * 200;
528 gren.angles = vectoangles (gren.velocity);
529 gren.avelocity = '150 1500 150';
531 gren.touch = W_Grenade_Touch;
532 gren.think = W_Grenade_FuseExplode;
533 gren.nextthink = time + 2;
535 self.attack_finished = time + 1;
536 self.ammo_rockets = self.ammo_rockets - 1;
539 void W_Grenade_Attack2 (void)
543 sound (self, CHAN_WEAPON, "weapons/Grenade_fire.wav", 1, ATTN_NORM);
545 self.punchangle_x = -4;
549 gren.classname = "grenade";
551 gren.movetype = MOVETYPE_TOSS;
552 gren.solid = SOLID_BBOX;
554 gren.takedamage = DAMAGE_YES;
556 gren.event_hurt = W_Grenade_Explode;
558 setmodel (gren, "models/grenademodel.md3");
559 setsize (gren, '0 0 0', '0 0 0');
561 makevectors (self.v_angle);
562 setorigin (gren, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -12);
564 gren.velocity = v_forward * 1400 + v_up * 100;
565 gren.angles = vectoangles (gren.velocity);
566 gren.avelocity = '150 1500 150';
568 gren.touch = W_Grenade_Explode;
569 gren.think = W_Grenade_FuseExplode;
570 gren.nextthink = time + 5;
572 self.attack_finished = time + 1;
573 self.ammo_rockets = self.ammo_rockets - 1;
576 void W_Electro_Touch (void)
578 WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
579 WriteByte (MSG_BROADCAST, 79);
580 WriteCoord (MSG_BROADCAST, self.origin_x);
581 WriteCoord (MSG_BROADCAST, self.origin_y);
582 WriteCoord (MSG_BROADCAST, self.origin_z);
583 WriteCoord (MSG_BROADCAST, 0); // SeienAbunae: groan... Useless clutter
584 WriteCoord (MSG_BROADCAST, 0);
585 WriteCoord (MSG_BROADCAST, 0);
586 WriteByte (MSG_BROADCAST, 155);
588 if (other.classname == "player" || other.classname == "corpse" || other.classname == "gib")
590 Damage (self.owner, self.origin, other, 0, 40);
591 // SeienAbunae: the impact sound doesn't seem to play when the victim dies instead of being hurt
592 // Maybe it's not that big of a deal
594 sound (other, CHAN_IMPACT, "misc/BodyImpact1.wav", 1, ATTN_NORM);
596 sound (other, CHAN_IMPACT, "misc/BodyImpact2.wav", 1, ATTN_NORM);
602 void W_Electro_Attack (void)
606 sound (self, CHAN_WEAPON, "weapons/Electro_fire.wav", 1, ATTN_NORM);
610 proj.classname = "elec";
612 proj.movetype = MOVETYPE_FLY;
613 proj.solid = SOLID_BBOX;
616 makevectors (self.v_angle);
618 setmodel (proj, "models/bullet.mdl");
619 setsize (proj, '0 0 0', '0 0 0');
620 setorigin (proj, self.origin + self.view_ofs + v_forward * 18 + v_right * 5 + v_up * -12);
622 proj.velocity = v_forward * 3000;
623 proj.touch = W_Electro_Touch;
624 proj.think = SUB_Remove;
625 proj.nextthink = time + 3;
627 self.attack_finished = time + 0.6;
628 self.ammo_cells = self.ammo_cells - 1;
631 void W_Plasma_Touch (void)
633 if (other.classname == "player" || other.classname == "corpse" || other.classname == "gib")
634 Damage (self.owner, self.origin, other, 0, 15);
636 ImpactEffect (self, IT_ELECTRO);
641 void W_Electro_Attack2 (void)
645 sound (self, CHAN_WEAPON, "weapons/LazerGun_Fire.wav", 1, ATTN_NORM);
649 proj.classname = "plasma";
651 proj.movetype = MOVETYPE_FLY;
652 proj.solid = SOLID_BBOX;
653 proj.effects = EF_DIMLIGHT;
655 makevectors (self.v_angle);
657 setmodel (proj, "models/sprites/plasmashot.spr32");
658 setsize (proj, '0 0 0', '0 0 0');
659 setorigin (proj, self.origin + self.view_ofs + v_forward * 5 + v_right * 5 + v_up * -12);
661 proj.velocity = v_forward * 5000;
662 proj.touch = W_Plasma_Touch;
663 proj.think = SUB_Remove;
664 proj.nextthink = time + 1.5;
666 self.attack_finished = time + 0.175;
667 self.ammo_cells = self.ammo_cells - 1;
670 void W_Crylink_Attack (void)
674 sound (self, CHAN_WEAPON, "weapons/crylink.wav", 1, ATTN_NORM);
675 org = self.origin + self.view_ofs + v_forward * 18 + v_right * 7 + v_up * -9;
676 makevectors (self.v_angle);
678 // FIXME: make it accurate!
680 traceline (org, self.origin + self.view_ofs + (v_forward * 4096), FALSE, self);
682 WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
683 WriteByte (MSG_BROADCAST, 76);
684 WriteCoord (MSG_BROADCAST, org_x);
685 WriteCoord (MSG_BROADCAST, org_y);
686 WriteCoord (MSG_BROADCAST, org_z);
687 WriteCoord (MSG_BROADCAST, trace_endpos_x);
688 WriteCoord (MSG_BROADCAST, trace_endpos_y);
689 WriteCoord (MSG_BROADCAST, trace_endpos_z);
690 WriteCoord (MSG_BROADCAST, self.v_angle_x);
691 WriteCoord (MSG_BROADCAST, self.v_angle_y);
692 WriteCoord (MSG_BROADCAST, self.v_angle_z);
694 te_spike (trace_endpos);
696 self.ammo_cells = self.ammo_cells - 0.25;
697 self.attack_finished = time + 0.165;
700 void W_Crylink_Attack2 (void)
705 makevectors (self.v_angle);
707 org = self.origin + self.view_ofs + v_forward * 19 + v_right * 5 + v_up * -7;
709 traceline (org, self.origin + self.view_ofs + v_forward * 4096 + v_right * (random () * 100 - 50) + v_up * (random () * 100 - 50), FALSE, self);
711 te_lightning1 (self, org, trace_endpos);
713 self.attack_finished = time + 0.075;
716 void W_Nex_Smite (void)
721 void W_Nex_Attack (void)
726 sound (self, CHAN_WEAPON, "weapons/NexFire.wav", 1, ATTN_NORM);
727 //self.effects = EF_MUZZLEFLASH;
728 self.punchangle_x = -4;
730 makevectors (self.v_angle);
732 org = self.origin + self.view_ofs + v_forward * 18 + v_right * 8 + v_up * -5;
734 // FIXME: iterate to hit multiple guys
735 // FIXME: make it accurate!
736 traceline (org, self.origin + self.view_ofs + (v_forward * 4096), FALSE, self);
738 WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
739 WriteByte (MSG_BROADCAST, 76);
740 WriteCoord (MSG_BROADCAST, org_x);
741 WriteCoord (MSG_BROADCAST, org_y);
742 WriteCoord (MSG_BROADCAST, org_z);
743 WriteCoord (MSG_BROADCAST, trace_endpos_x);
744 WriteCoord (MSG_BROADCAST, trace_endpos_y);
745 WriteCoord (MSG_BROADCAST, trace_endpos_z);
746 WriteCoord (MSG_BROADCAST, self.v_angle_x);
747 WriteCoord (MSG_BROADCAST, self.v_angle_y);
748 WriteCoord (MSG_BROADCAST, self.v_angle_z);
750 te_plasmaburn (trace_endpos);
752 dir = trace_plane_normal * 100;
753 WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
754 WriteByte (MSG_BROADCAST, TE_FLAMEJET);
755 WriteCoord (MSG_BROADCAST, trace_endpos_x);
756 WriteCoord (MSG_BROADCAST, trace_endpos_y);
757 WriteCoord (MSG_BROADCAST, trace_endpos_z);
758 WriteCoord (MSG_BROADCAST, dir_x);
759 WriteCoord (MSG_BROADCAST, dir_y);
760 WriteCoord (MSG_BROADCAST, dir_z);
761 WriteByte (MSG_BROADCAST, 255);
763 PointSound (trace_endpos, "weapons/NexImpact.wav", 1, ATTN_NORM);
765 self.attack_finished = time + 1;
766 self.ammo_cells = self.ammo_cells - 1;
769 void W_Nex_Attack2 (void)
774 void W_Hagar_Explode (void)
776 ImpactEffect (self, IT_HAGAR);
778 RadiusDamage (self.owner, self, 0, 100, world);
783 void W_Hagar_Touch (void)
785 if (other == self.owner)
787 else if (pointcontents (self.origin) == CONTENT_SKY)
796 void W_Hagar_Attack (void)
801 sound (self, CHAN_WEAPON, "weapons/Hagar_Fire.wav", 1, ATTN_NORM);
804 missile.owner = self;
805 missile.classname = "rocket";
807 missile.takedamage = DAMAGE_YES;
809 missile.event_hurt = W_Hagar_Explode;
811 missile.movetype = MOVETYPE_FLY;
812 missile.solid = SOLID_BBOX;
813 setmodel (missile, "models/hagarmissile.mdl");
814 setsize (missile, '0 0 0', '0 0 0');
816 makevectors (self.v_angle);
818 org = self.origin + self.view_ofs + v_forward * 20 + v_right * 4 + v_up * -15;
820 setorigin (missile, org);
821 missile.velocity = v_forward * 2000;
822 missile.angles = vectoangles (missile.velocity);
824 missile.touch = W_Hagar_Touch;
825 missile.think = SUB_Remove;
826 missile.nextthink = time + 1;
828 self.attack_finished = time + 0.2;
829 self.ammo_rockets = self.ammo_rockets - 0.25;
832 void W_Hagar_Attack2 (void)
837 void W_Rocket_Explode (entity ignore)
839 ImpactEffect (self, IT_ROCKET_LAUNCHER);
841 RadiusDamage (self.owner, self, 0, 100, ignore);
846 void W_Rocket_Touch (void)
848 if (other == self.owner)
850 else if (pointcontents (self.origin) == CONTENT_SKY)
855 else if (other.classname == "player" || other.classname == "corpse")
857 Damage (self.owner, self.origin, other, 0, 100);
858 W_Rocket_Explode (other);
861 W_Rocket_Explode (world);
864 void W_Rocket_Attack (void)
869 sound (self, CHAN_WEAPON, "weapons/Rocket_Fire.wav", 1, ATTN_NORM);
872 missile.owner = self;
873 missile.classname = "rocket";
875 missile.takedamage = DAMAGE_YES;
877 missile.event_hurt = W_Rocket_Explode;
879 missile.movetype = MOVETYPE_FLY;
880 missile.solid = SOLID_BBOX;
881 setmodel (missile, "models/rocketmissile.mdl");
882 setsize (missile, '0 0 0', '0 0 0');
884 makevectors (self.v_angle);
886 org = self.origin + self.view_ofs + v_forward * 20 + v_right * 4 + v_up * -15;
888 setorigin (missile, org);
889 missile.velocity = v_forward * 2500;
890 missile.angles = vectoangles (missile.velocity);
892 missile.touch = W_Rocket_Touch;
893 missile.think = SUB_Remove;
894 missile.nextthink = time + 1;
896 self.attack_finished = time + 0.5;
897 self.ammo_rockets = self.ammo_rockets - 1;
901 void W_Rocket_Attack2 (void)
911 if (self.weapon == IT_LASER)
913 else if (self.weapon == IT_UZI)
915 else if (self.weapon == IT_SHOTGUN)
917 else if (self.weapon == IT_GRENADE_LAUNCHER)
919 else if (self.weapon == IT_ELECTRO)
921 else if (self.weapon == IT_CRYLINK)
923 else if (self.weapon == IT_NEX)
925 else if (self.weapon == IT_HAGAR)
927 else if (self.weapon == IT_ROCKET_LAUNCHER)
933 void W_SecondaryAttack (void)
938 if (self.weapon == IT_LASER)
940 else if (self.weapon == IT_UZI)
942 else if (self.weapon == IT_SHOTGUN)
943 W_Shotgun_Attack2 ();
944 else if (self.weapon == IT_GRENADE_LAUNCHER)
945 W_Grenade_Attack2 ();
946 else if (self.weapon == IT_ELECTRO)
947 W_Electro_Attack2 ();
948 else if (self.weapon == IT_CRYLINK)
949 W_Crylink_Attack2 ();
950 else if (self.weapon == IT_NEX)
952 else if (self.weapon == IT_HAGAR)
954 else if (self.weapon == IT_ROCKET_LAUNCHER)