4 void() uzi_deselect_01;
9 if (self.ammo_nails > 0)
14 void(float req) w_uzi =
18 else if (req == WR_FIRE1)
19 weapon_prepareattack(uzi_check, uzi_check, uzi_fire1_01, 0.075);
20 else if (req == WR_FIRE2)
21 weapon_prepareattack(uzi_check, uzi_check, uzi_fire2_01, 0.4);
22 else if (req == WR_RAISE)
24 else if (req == WR_UPDATECOUNTS)
25 self.currentammo = self.ammo_nails;
26 else if (req == WR_DROP)
28 else if (req == WR_SETUP)
29 weapon_setup(WEP_UZI, "w_uzi.zym", IT_SHELLS);
30 else if (req == WR_CHECKAMMO)
31 weapon_hasammo = uzi_check();
34 void W_Uzi_Attack (void)
36 makevectors(self.v_angle);
37 sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", 1, ATTN_NORM);
39 fireBullet (v_forward, 100, 5, IT_UZI);
41 self.punchangle_x = random () - 0.5;
42 self.punchangle_y = random () - 0.5;
43 self.punchangle_z = random () - 0.5;
45 self.attack_finished = time + 0.075;
46 self.ammo_nails = self.ammo_nails - 1;
48 vector org; // casing code
49 org = self.origin + self.view_ofs + (v_right * 6) - (v_up * 1) + (v_forward * 20);
50 SpawnCasing (org, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 + 10) * v_up), 2, v_forward,'0 250 0', 100, 2);
51 //W_Smoke(org, v_forward, 12);
54 void W_Uzi_Attack2 (void)
56 makevectors(self.v_angle);
57 sound (self, CHAN_WEAPON, "weapons/uzi_fire.wav", 1, ATTN_NORM);
59 fireBullet (v_forward, 0, 10, IT_UZI);
61 self.attack_finished = time + 0.16;
62 self.ammo_nails = self.ammo_nails - 1;
64 vector org; // casing code
65 org = self.origin + self.view_ofs + (v_right * 6) - (v_up * 1) + (v_forward * 20);
66 SpawnCasing (org, ((random () * 50 + 50) * v_right) - ((random () * 25 + 25) * v_forward) - ((random () * 5 + 10) * v_up), 2, v_forward,'0 250 0', 100, 2);
70 void() uzi_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, uzi_ready_01); self.weaponentity.state = WS_READY;};
71 void() uzi_select_01 = {weapon_thinkf(-1, PLAYER_WEAPONSELECTION_DELAY, w_ready); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');};
72 void() uzi_deselect_01 = {weapon_thinkf(-1, PLAYER_WEAPONSELECTION_DELAY, w_clear); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);};
75 weapon_doattack(uzi_check, uzi_check, W_Uzi_Attack);
77 weapon_thinkf(WFRAME_FIRE1, 0.075, uzi_fire1_01);
79 weapon_thinkf(WFRAME_FIRE1, 0.075, uzi_ready_01);
83 weapon_doattack(uzi_check, uzi_check, W_Uzi_Attack2);
85 weapon_thinkf(WFRAME_FIRE2, 0.16, uzi_fire2_01);
87 weapon_thinkf(WFRAME_FIRE2, 0.1, uzi_ready_01);