1 void W_MinstaNex_Attack (void)
4 flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
6 W_SetupShot (self, '25 8 -4', TRUE, 5, "weapons/nexfire.wav");
9 FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, 1000, 800, WEP_MINSTANEX);
14 announce(self, "announcer/male/yoda.ogg");
16 pointparticles(particleeffectnum("nex_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
19 trailparticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, trace_endpos);
20 // flash and burn the wall
21 if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
22 pointparticles(particleeffectnum("nex_impact"), trace_endpos - w_shotdir * 6, '0 0 0', 1);
24 soundat (self, trace_endpos, CHAN_PROJECTILE, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
26 if not(self.items & IT_UNLIMITED_AMMO)
29 self.ammo_cells = self.ammo_cells - 1;
31 self.ammo_cells = self.ammo_cells - cvar("g_balance_minstanex_ammo");
36 .float minstagib_nextthink;
37 void minstagib_ammocheck (void)
39 if (time < self.minstagib_nextthink || self.deadflag || gameover)
42 if (self.ammo_cells <= 0)
46 centerprint(self, "you're dead now...\n");
47 Damage(self, self, self, 5, DEATH_NOAMMO, self.origin, '0 0 0');
48 announce(self, "announcer/robotic/terminated.ogg");
50 if (self.health == 10)
52 centerprint(self, "^11^7 second left to find some ammo\n");
53 Damage(self, self, self, 5, DEATH_NOAMMO, self.origin, '0 0 0');
54 announce(self, "announcer/robotic/1.ogg");
56 if (self.health == 20)
58 centerprint(self, "^12^7 seconds left to find some ammo\n");
59 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
60 announce(self, "announcer/robotic/2.ogg");
62 if (self.health == 30)
64 centerprint(self, "^13^7 seconds left to find some ammo\n");
65 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
66 announce(self, "announcer/robotic/3.ogg");
68 if (self.health == 40)
70 centerprint(self, "^14^7 seconds left to find some ammo\n");
71 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
72 announce(self, "announcer/robotic/4.ogg");
74 if (self.health == 50)
76 centerprint(self, "^15^7 seconds left to find some ammo\n");
77 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
78 announce(self, "announcer/robotic/5.ogg");
80 if (self.health == 60)
82 centerprint(self, "^36^7 seconds left to find some ammo\n");
83 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
84 announce(self, "announcer/robotic/6.ogg");
86 if (self.health == 70)
88 centerprint(self, "^37^7 seconds left to find some ammo\n");
89 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
90 announce(self, "announcer/robotic/7.ogg");
92 if (self.health == 80)
94 centerprint(self, "^38^7 seconds left to find some ammo\n");
95 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
96 announce(self, "announcer/robotic/8.ogg");
98 if (self.health == 90)
100 centerprint(self, "^39^7 seconds left to find some ammo\n");
101 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
102 announce(self, "announcer/robotic/9.ogg");
104 if (self.health == 100)
106 centerprint(self, "get some ammo or\nyou'll be dead in ^310^7 seconds...");
107 Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
108 announce(self, "announcer/robotic/10.ogg");
111 self.minstagib_nextthink = time + 1;
114 void spawnfunc_weapon_minstanex (void); // defined in t_items.qc
116 float w_minstanex(float req)
119 self.BUTTON_ATCK = bot_aim(1000000, 0, 1, FALSE);
120 else if (req == WR_THINK)
122 if (self.BUTTON_ATCK)
124 if (weapon_prepareattack(0, cvar("g_balance_minstanex_refire")))
126 W_MinstaNex_Attack();
127 weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_minstanex_animtime"), w_ready);
130 else if (self.BUTTON_ATCK2)
132 if (self.jump_interval <= time)
134 self.jump_interval = time + 0.9;
135 W_Laser_Attack(FALSE);
139 else if (req == WR_PRECACHE)
141 precache_model ("models/nexflash.md3");
142 precache_model ("models/weapons/g_minstanex.md3");
143 precache_model ("models/weapons/v_minstanex.md3");
144 precache_model ("models/weapons/w_minstanex.zym");
145 precache_sound ("weapons/nexfire.wav");
146 precache_sound ("weapons/neximpact.wav");
147 w_laser(WR_PRECACHE);
149 else if (req == WR_SETUP)
150 weapon_setup(WEP_MINSTANEX);
151 else if (req == WR_CHECKAMMO1)
154 return self.ammo_cells >= 1;
156 return self.ammo_cells >= cvar("g_balance_minstanex_ammo");
158 else if (req == WR_CHECKAMMO2)
160 else if (req == WR_SUICIDEMESSAGE)
161 w_deathtypestring = "did the impossible";
162 else if (req == WR_KILLMESSAGE)
163 w_deathtypestring = "has been vaporized by";