1 void W_Nex_Attack (void)
4 flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
6 W_SetupShot (self, '25 4 -4', TRUE, 5, "weapons/nexfire.wav");
9 FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, cvar("g_balance_nex_damage"), cvar("g_balance_nex_force"), WEP_NEX);
12 announce(self, "announcer/male/yoda.wav");
14 pointparticles(particleeffectnum("nex_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
17 trailparticles(world, particleeffectnum("nex_beam"), w_shotorg, trace_endpos);
18 // flash and burn the wall
19 if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
20 Damage_DamageInfo(trace_endpos, cvar("g_balance_nex_damage"), 0, 0, cvar("g_balance_nex_force") * w_shotdir, WEP_NEX);
22 if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
23 self.ammo_cells = self.ammo_cells - cvar("g_balance_nex_ammo");
26 void spawnfunc_weapon_nex (void); // defined in t_items.qc
28 float w_nex(float req)
31 self.BUTTON_ATCK = bot_aim(1000000, 0, 1, FALSE);
32 else if (req == WR_THINK)
36 if (weapon_prepareattack(0, cvar("g_balance_nex_refire")))
39 weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_nex_animtime"), w_ready);
43 else if (req == WR_PRECACHE)
45 precache_model ("models/nexflash.md3");
46 precache_model ("models/weapons/g_nex.md3");
47 precache_model ("models/weapons/v_nex.md3");
48 precache_model ("models/weapons/w_nex.zym");
49 precache_sound ("weapons/nexfire.wav");
51 else if (req == WR_SETUP)
52 weapon_setup(WEP_NEX);
53 else if (req == WR_CHECKAMMO1)
54 return self.ammo_cells >= cvar("g_balance_nex_ammo");
55 else if (req == WR_CHECKAMMO2)
57 else if (req == WR_SUICIDEMESSAGE)
58 w_deathtypestring = "did the impossible";
59 else if (req == WR_KILLMESSAGE)
60 w_deathtypestring = "has been vaporized by";