4 void() nex_deselect_01;
9 if (self.ammo_cells > 0)
14 void(float req) w_nex =
18 else if (req == WR_FIRE1)
19 weapon_prepareattack(nex_check, nex_check, nex_fire1_01, 1);
20 else if (req == WR_FIRE2)
21 weapon_prepareattack(nex_check, nex_check, nex_fire2_01, 1);
22 else if (req == WR_RAISE)
24 else if (req == WR_UPDATECOUNTS)
25 self.currentammo = self.ammo_cells;
26 else if (req == WR_DROP)
28 else if (req == WR_SETUP)
29 weapon_setup(WEP_NEX, "w_nex.zym", IT_CELLS);
30 else if (req == WR_CHECKAMMO)
31 weapon_hasammo = nex_check();
35 void W_Nex_Attack (void)
41 sound (self, CHAN_WEAPON, "weapons/nexfire.wav", 1, ATTN_NORM);
42 self.punchangle_x = -4;
43 makevectors(self.v_angle);
44 org = self.origin + self.view_ofs + v_forward * 18 + v_right * 8 + v_up * -5;
47 if (game & GAME_INSTAGIB)
48 FireRailgunBullet (org, self.origin + self.view_ofs + v_forward * 4096, 800, IT_NEX);
50 FireRailgunBullet (org, self.origin + self.view_ofs + v_forward * 4096, 100, IT_NEX);
52 te_plasmaburn (trace_endpos);
54 if (trace_fraction < 1.0)
56 dir = trace_plane_normal * 100;
57 WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
58 WriteByte (MSG_BROADCAST, TE_FLAMEJET);
59 WriteCoord (MSG_BROADCAST, trace_endpos_x);
60 WriteCoord (MSG_BROADCAST, trace_endpos_y);
61 WriteCoord (MSG_BROADCAST, trace_endpos_z);
62 WriteCoord (MSG_BROADCAST, dir_x);
63 WriteCoord (MSG_BROADCAST, dir_y);
64 WriteCoord (MSG_BROADCAST, dir_z);
65 WriteByte (MSG_BROADCAST, 255);
68 setorigin (explosion, trace_endpos);
69 RadiusDamage (explosion, self, 10, 0, 50, world, 300, IT_ROCKET_LAUNCHER);
72 PointSound (trace_endpos, "weapons/neximpact.wav", 1, ATTN_NORM);
75 self.attack_finished = time + 1;
77 if (!(game & GAME_INSTAGIB))
78 self.ammo_cells = self.ammo_cells - 1;
81 void W_Nex_Attack2 (void)
83 makevectors(self.v_angle);
87 void() nex_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, nex_ready_01); self.weaponentity.state = WS_READY;};
88 void() nex_select_01 = {weapon_thinkf(-1, PLAYER_WEAPONSELECTION_DELAY, w_ready); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');};
89 void() nex_deselect_01 = {weapon_thinkf(-1, PLAYER_WEAPONSELECTION_DELAY, w_clear); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);};
92 weapon_doattack(nex_check, nex_check, W_Nex_Attack);
93 weapon_thinkf(WFRAME_FIRE1, 0.3, nex_ready_01);
97 weapon_doattack(nex_check, nex_check, W_Nex_Attack);
98 weapon_thinkf(WFRAME_FIRE2, 0.5, nex_ready_01);