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