aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/client/CL_newfx.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2/client/CL_newfx.java')
-rw-r--r--src/jake2/client/CL_newfx.java30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/jake2/client/CL_newfx.java b/src/jake2/client/CL_newfx.java
index 5346226..67abf81 100644
--- a/src/jake2/client/CL_newfx.java
+++ b/src/jake2/client/CL_newfx.java
@@ -2,7 +2,7 @@
* CL_newfx.java
* Copyright (C) 2004
*
- * $Id: CL_newfx.java,v 1.3 2004-07-08 20:24:29 hzi Exp $
+ * $Id: CL_newfx.java,v 1.2 2004-07-08 15:58:43 hzi Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -28,8 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
package jake2.client;
-import jake2.Globals;
-
/**
* CL_newfx
@@ -173,7 +171,7 @@ public class CL_newfx extends CL_fx {
p.time = cl.time;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (1 + Globals.rnd.nextFloat() * 0.5f);
+ p.alphavel = -1.0f / (1 + frand() * 0.5f);
p.color = colorStart + (rand() % colorRun);
for (j = 0; j < 3; j++) {
p.org[j] = move[j] + crand() * 3;
@@ -206,7 +204,7 @@ public class CL_newfx extends CL_fx {
if (free_particles == null)
return;
- if (Globals.rnd.nextFloat() > 0.3) {
+ if (frand() > 0.3) {
p = free_particles;
free_particles = p.next;
p.next = active_particles;
@@ -216,7 +214,7 @@ public class CL_newfx extends CL_fx {
p.time = cl.time;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (3.0f + Globals.rnd.nextFloat() * 0.5f);
+ p.alphavel = -1.0f / (3.0f + frand() * 0.5f);
p.color = color;
for (j = 0; j < 3; j++) {
p.org[j] = move[j] + crand() * 3;
@@ -321,7 +319,7 @@ public class CL_newfx extends CL_fx {
// VectorCopy (accel, p.accel);
p.alpha = 1.0f;
- p.alphavel = -1.0f / (0.5f + Globals.rnd.nextFloat() * alphavel);
+ p.alphavel = -1.0f / (0.5f + frand() * alphavel);
// p.alphavel = alphavel;
}
}
@@ -362,7 +360,7 @@ public class CL_newfx extends CL_fx {
p.time = cl.time;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (1+Globals.rnd.nextFloat()*0.1f);
+ p.alphavel = -1.0f / (1+frand()*0.1f);
p.color = 4 + (rand()&7);
for (j=0 ; j<3 ; j++)
{
@@ -512,7 +510,7 @@ public class CL_newfx extends CL_fx {
p.accel[2] = -PARTICLE_GRAVITY / 2;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (0.5f + Globals.rnd.nextFloat() * 0.3f);
+ p.alphavel = -1.0f / (0.5f + frand() * 0.3f);
}
}
@@ -557,7 +555,7 @@ public class CL_newfx extends CL_fx {
p.accel[2] = -PARTICLE_GRAVITY / 2;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (0.5f + Globals.rnd.nextFloat() * 0.3f);
+ p.alphavel = -1.0f / (0.5f + frand() * 0.3f);
}
self.nextthink += self.thinkinterval;
}
@@ -775,7 +773,7 @@ public class CL_newfx extends CL_fx {
p.accel[0] = p.accel[1] = 0;
p.alpha = 1.0f;
- p.alphavel = -0.8f / (0.5f + Globals.rnd.nextFloat() * 0.3f);
+ p.alphavel = -0.8f / (0.5f + frand() * 0.3f);
}
}
@@ -848,7 +846,7 @@ public class CL_newfx extends CL_fx {
p.time = cl.time;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (0.8f + Globals.rnd.nextFloat() * 0.2f);
+ p.alphavel = -1.0f / (0.8f + frand() * 0.2f);
p.color = color;
for (j = 0; j < 3; j++) {
p.org[j] = move[j] + crand() * 16;
@@ -889,7 +887,7 @@ public class CL_newfx extends CL_fx {
p.accel[2] = -PARTICLE_GRAVITY;
p.alpha = 1.0f;
- p.alphavel = -0.4f / (0.6f + Globals.rnd.nextFloat() * 0.2f);
+ p.alphavel = -0.4f / (0.6f + frand() * 0.2f);
}
}
@@ -934,7 +932,7 @@ public class CL_newfx extends CL_fx {
p.accel[0] = p.accel[1] = p.accel[2] = 0;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (0.5f + Globals.rnd.nextFloat()*0.3f);
+ p.alphavel = -1.0f / (0.5f + frand()*0.3f);
}
}
@@ -973,7 +971,7 @@ public class CL_newfx extends CL_fx {
p.accel[2] = -PARTICLE_GRAVITY;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (0.5f + Globals.rnd.nextFloat() * 0.3f);
+ p.alphavel = -1.0f / (0.5f + frand() * 0.3f);
}
}
@@ -1014,7 +1012,7 @@ public class CL_newfx extends CL_fx {
p.time = cl.time;
p.alpha = 1.0f;
- p.alphavel = -1.0f / (0.3f + Globals.rnd.nextFloat() * 0.2f);
+ p.alphavel = -1.0f / (0.3f + frand() * 0.2f);
p.color = 0xd0;
for (j = 0; j < 3; j++) {
p.org[j] = move[j] + crand();