public static void Nukeblast(cl_sustain_t self) { int i; cparticle_t p; float ratio; ratio = 1F - (((float)self.endtime - (float)Globals.cl.time) / 1000F); for (i = 0; i < 700; i++) { if (CL_fx.free_particles == null) { return; } p = CL_fx.free_particles; CL_fx.free_particles = p.next; p.next = CL_fx.active_particles; CL_fx.active_particles = p; Math3D.VectorClear(p.accel); p.time = Globals.cl.time; p.alpha = 1F; p.alphavel = CL_fx.INSTANT_PARTICLE; p.color = nb_colortable[Lib.Rand() & 3]; dir[0] = Lib.Crand(); dir[1] = Lib.Crand(); dir[2] = Lib.Crand(); Math3D.VectorNormalize(dir); Math3D.VectorMA(self.org, (200F * ratio), dir, p.org); } }
public static void ParticleSteamEffect2(cl_sustain_t self) { int i, j; cparticle_t p; float d; Math3D.VectorCopy(self.dir, dir); Math3D.MakeNormalVectors(dir, r, u); for (i = 0; i < self.count; i++) { if (CL_fx.free_particles == null) { return; } p = CL_fx.free_particles; CL_fx.free_particles = p.next; p.next = CL_fx.active_particles; CL_fx.active_particles = p; p.time = Globals.cl.time; p.color = self.color + (Lib.Rand() & 7); for (j = 0; j < 3; j++) { p.org[j] = self.org[j] + self.magnitude * 0.1F * Lib.Crand(); } Math3D.VectorScale(dir, self.magnitude, p.vel); d = Lib.Crand() * self.magnitude / 3; Math3D.VectorMA(p.vel, d, r, p.vel); d = Lib.Crand() * self.magnitude / 3; Math3D.VectorMA(p.vel, d, u, p.vel); p.accel[0] = p.accel[1] = 0; p.accel[2] = -CL_fx.PARTICLE_GRAVITY / 2; p.alpha = 1F; p.alphavel = -1F / (0.5F + (float)Globals.rnd.NextDouble() * 0.3F); } self.nextthink += self.thinkinterval; }
public abstract void Think(cl_sustain_t self);