4 void() nex_deselect_01;
9 if (self.ammo_cells >= 5)
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 * 28 + v_right * 14 + v_up * -7;
47 FireRailgunBullet (org, self.origin + self.view_ofs + v_forward * 4096, cvar("g_balance_nex_damage"), IT_NEX);
49 self.attack_finished = time + 1;
51 if (cvar("g_instagib") == 0)
52 self.ammo_cells = self.ammo_cells - 5;
56 //flash.drawonlytoclient;
57 org = self.origin + self.view_ofs + v_forward * 33 + v_right * 14 + v_up * -7;
58 setorigin (flash, org);
59 setmodel (flash, "models/nexflash.md3");
60 flash.velocity = v_forward * 20;
61 flash.angles = vectoangles (flash.velocity);
62 SUB_SetFade (flash, time);
63 flash.effects = flash.effects | EF_ADDITIVE;
66 void W_Nex_Attack2 (void)
68 makevectors(self.v_angle);
72 void() nex_ready_01 = {weapon_thinkf(WFRAME_IDLE, 0.1, nex_ready_01); self.weaponentity.state = WS_READY;};
73 void() nex_select_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdelay"), w_ready); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, '0 0 0');};
74 void() nex_deselect_01 = {weapon_thinkf(-1, cvar("g_balance_weaponswitchdelay"), w_clear); weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);};
77 weapon_doattack(nex_check, nex_check, W_Nex_Attack);
78 weapon_thinkf(WFRAME_FIRE1, 0.3, nex_ready_01);
82 weapon_doattack(nex_check, nex_check, W_Nex_Attack);
83 weapon_thinkf(WFRAME_FIRE2, 0.5, nex_ready_01);