diff options
author | Holger Zickner <[email protected]> | 2004-10-11 14:04:16 +0000 |
---|---|---|
committer | Holger Zickner <[email protected]> | 2004-10-11 14:04:16 +0000 |
commit | 7d77a7e744a884e328e33b2bce82ac8e21300ef3 (patch) | |
tree | 5f86d56eeeb6946002ffd0bb3365adfff12aed86 | |
parent | 5a89f0f1e1bc7abd8e75b02fb26fb93f39006e96 (diff) |
remove some unreferenced functions
-rw-r--r-- | src/jake2/client/CL.java | 14 | ||||
-rw-r--r-- | src/jake2/client/CL_ents.java | 64 | ||||
-rw-r--r-- | src/jake2/client/CL_fx.java | 76 | ||||
-rw-r--r-- | src/jake2/client/CL_newfx.java | 176 | ||||
-rw-r--r-- | src/jake2/client/CL_tent.java | 25 |
5 files changed, 21 insertions, 334 deletions
diff --git a/src/jake2/client/CL.java b/src/jake2/client/CL.java index 2eb20f0..5b6fae5 100644 --- a/src/jake2/client/CL.java +++ b/src/jake2/client/CL.java @@ -2,7 +2,7 @@ * CL.java * Copyright (C) 2004 * - * $Id: CL.java,v 1.12 2004-10-04 12:50:37 hzi Exp $ + * $Id: CL.java,v 1.13 2004-10-11 14:04:16 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -877,18 +877,6 @@ public final class CL { Com.Printf("Unknown command.\n"); } - /* - * ================= CL_DumpPackets - * - * A vain attempt to help bad TCP stacks that cause problems when they - * overflow ================= - */ - static void DumpPackets() { - while (NET.GetPacket(Defines.NS_CLIENT, Globals.net_from, - Globals.net_message)) { - Com.Printf("dumping a packet\n"); - } - } /* * ================= CL_ReadPackets ================= diff --git a/src/jake2/client/CL_ents.java b/src/jake2/client/CL_ents.java index df189fa..4e23e74 100644 --- a/src/jake2/client/CL_ents.java +++ b/src/jake2/client/CL_ents.java @@ -2,7 +2,7 @@ * java * Copyright (C) 2004 * - * $Id: CL_ents.java,v 1.6 2004-09-22 19:22:07 salomo Exp $ + * $Id: CL_ents.java,v 1.7 2004-10-11 14:04:16 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -27,13 +27,8 @@ package jake2.client; import jake2.Defines; import jake2.Globals; -import jake2.game.entity_state_t; -import jake2.game.player_state_t; -import jake2.game.pmove_t; -import jake2.qcommon.Com; -import jake2.qcommon.FS; -import jake2.qcommon.MSG; -import jake2.render.model_t; +import jake2.game.*; +import jake2.qcommon.*; import jake2.util.Math3D; /** @@ -588,58 +583,9 @@ public class CL_ents { * ========================================================================== */ - public static model_t S_RegisterSexedModel(entity_state_t ent, String base) { - int n; - model_t mdl; - String model; - String buffer; - - // determine what model the client is using - model = ""; - - n = Defines.CS_PLAYERSKINS + ent.number - 1; - - if (Globals.cl.configstrings[n].length() > 0) { - - int pos = Globals.cl.configstrings[n].indexOf('\\'); - if (pos != -1) { - pos++; - model = Globals.cl.configstrings[n].substring(pos); - pos = model.indexOf('/'); - if (pos != -1) - model = model.substring(0, pos); - } - } - // if we can't figure it out, they're male - if (model.length() == 0) - model = "male"; - - buffer = "players/" + model + "/" + base + 1; - mdl = Globals.re.RegisterModel(buffer); - if (mdl == null) { - // not found, try default weapon model - buffer = "players/" + model + "/weapon.md2"; - mdl = Globals.re.RegisterModel(buffer); - if (mdl == null) { - // no, revert to the male model - buffer = "players/male/" + base + 1; - mdl = Globals.re.RegisterModel(buffer); - if (mdl == null) { - // last try, default male weapon.md2 - buffer = "players/male/weapon.md2"; - mdl = Globals.re.RegisterModel(buffer); - } - } - } - - return mdl; - } - - // PMM - used in shell code - /* - * =============== CL_AddPacketEntities - * + * =============== + * CL_AddPacketEntities * =============== */ static void AddPacketEntities(frame_t frame) { diff --git a/src/jake2/client/CL_fx.java b/src/jake2/client/CL_fx.java index 3032f81..b3926e1 100644 --- a/src/jake2/client/CL_fx.java +++ b/src/jake2/client/CL_fx.java @@ -2,7 +2,7 @@ * java * Copyright (C) 2004 * - * $Id: CL_fx.java,v 1.6 2004-09-22 19:22:08 salomo Exp $ + * $Id: CL_fx.java,v 1.7 2004-10-11 14:04:16 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -51,7 +51,6 @@ public class CL_fx { float die; // stop lighting after this time - //float decay; // drop this each second float minlight; // don't add when contributing less void clear() { @@ -230,23 +229,10 @@ public class CL_fx { return dl; } - /* - * =============== CL_NewDlight =============== - */ - static void NewDlight(int key, float x, float y, float z, float radius, float time) { - cdlight_t dl; - - dl = AllocDlight(key); - dl.origin[0] = x; - dl.origin[1] = y; - dl.origin[2] = z; - dl.radius = radius; - dl.die = Globals.cl.time + time; - } /* - * =============== CL_RunDLights - * + * =============== + * CL_RunDLights * =============== */ static void RunDLights() { @@ -261,14 +247,13 @@ public class CL_fx { dl.radius = 0.0f; return; } - //dl[i].radius -= cls.frametime * dl[i].decay; - //if (dl[i].radius < 0) - // dl[i].radius = 0; } } /* - * ============== CL_ParseMuzzleFlash ============== + * ============== + * CL_ParseMuzzleFlash + * ============== */ static void ParseMuzzleFlash() { float[] fv = new float[3]; @@ -1369,55 +1354,10 @@ public class CL_fx { } } - /* - * =============== CL_QuadTrail - * - * =============== - */ - static void QuadTrail(float[] start, float[] end) { - float[] move = new float[3]; - float[] vec = new float[3]; - float len; - int j; - cparticle_t p; - int dec; - - Math3D.VectorCopy(start, move); - Math3D.VectorSubtract(end, start, vec); - len = Math3D.VectorNormalize(vec); - - dec = 5; - Math3D.VectorScale(vec, 5, vec); - - while (len > 0) { - len -= dec; - - if (free_particles == null) - return; - p = free_particles; - free_particles = p.next; - p.next = active_particles; - active_particles = p; - Math3D.VectorClear(p.accel); - - p.time = Globals.cl.time; - - p.alpha = 1.0f; - p.alphavel = -1.0f / (0.8f + Globals.rnd.nextFloat() * 0.2f); - p.color = 115; - for (j = 0; j < 3; j++) { - p.org[j] = move[j] + Lib.crand() * 16; - p.vel[j] = Lib.crand() * 5; - p.accel[j] = 0; - } - - Math3D.VectorAdd(move, vec, move); - } - } /* - * =============== CL_FlagTrail - * + * =============== + * CL_FlagTrail * =============== */ static void FlagTrail(float[] start, float[] end, float color) { diff --git a/src/jake2/client/CL_newfx.java b/src/jake2/client/CL_newfx.java index fa83c7b..1808751 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.5 2004-10-04 12:50:37 hzi Exp $ + * $Id: CL_newfx.java,v 1.6 2004-10-11 14:04:16 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -133,50 +133,6 @@ public class CL_newfx { } - /* - * =============== CL_SmokeTrail =============== - */ - static void SmokeTrail(float[] start, float[] end, int colorStart, - int colorRun, int spacing) { - float[] move = new float[3]; - float[] vec = new float[3]; - float len; - int j; - cparticle_t p; - - Math3D.VectorCopy(start, move); - Math3D.VectorSubtract(end, start, vec); - len = Math3D.VectorNormalize(vec); - - Math3D.VectorScale(vec, spacing, vec); - - // FIXME: this is a really silly way to have a loop - while (len > 0) { - len -= spacing; - - 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 = 1.0f; - p.alphavel = -1.0f / (1 + Globals.rnd.nextFloat() * 0.5f); - p.color = colorStart + (Lib.rand() % colorRun); - for (j = 0; j < 3; j++) { - p.org[j] = move[j] + Lib.crand() * 3; - p.accel[j] = 0; - } - p.vel[2] = 20 + Lib.crand() * 5; - - Math3D.VectorAdd(move, vec, move); - } - } - static void ForceWall(float[] start, float[] end, int color) { float[] move = new float[3]; float[] vec = new float[3]; @@ -223,99 +179,6 @@ public class CL_newfx { } } - // static void FlameEffects(centity_t ent, float[] origin) { - // int n, count; - // int j; - // cparticle_t p; - // - // count = rand() & 0xF; - // - // for (n = 0; n < count; n++) { - // if (free_particles == null) - // return; - // - // p = free_particles; - // free_particles = p.next; - // p.next = active_particles; - // active_particles = p; - // - // VectorClear(p.accel); - // p.time = cl.time; - // - // p.alpha = 1.0f; - // p.alphavel = -1.0f / (1 + frand() * 0.2f); - // p.color = 226 + (rand() % 4); - // for (j = 0; j < 3; j++) { - // p.org[j] = origin[j] + crand() * 5; - // p.vel[j] = crand() * 5; - // } - // p.vel[2] = crand() * -10; - // p.accel[2] = -PARTICLE_GRAVITY; - // } - // - // count = rand() & 0x7; - // - // for (n = 0; n < count; n++) { - // if (free_particles == null) - // return; - // p = free_particles; - // free_particles = p.next; - // p.next = active_particles; - // active_particles = p; - // VectorClear(p.accel); - // - // p.time = cl.time; - // - // p.alpha = 1.0f; - // p.alphavel = -1.0f / (1 + frand() * 0.5f); - // p.color = 0 + (rand() % 4); - // for (j = 0; j < 3; j++) { - // p.org[j] = origin[j] + crand() * 3; - // } - // p.vel[2] = 20 + crand() * 5; - // } - // - // } - - /* - * =============== CL_GenericParticleEffect =============== - */ - static void GenericParticleEffect(float[] org, float[] dir, int color, - int count, int numcolors, int dirspread, float alphavel) { - int i, j; - cparticle_t p; - float d; - - for (i = 0; i < 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; - if (numcolors > 1) - p.color = color + (Lib.rand() & numcolors); - else - p.color = color; - - d = Lib.rand() & dirspread; - for (j = 0; j < 3; j++) { - p.org[j] = org[j] + ((Lib.rand() & 7) - 4) + d * dir[j]; - p.vel[j] = Lib.crand() * 20; - } - - p.accel[0] = p.accel[1] = 0; - p.accel[2] = -CL_fx.PARTICLE_GRAVITY; - // VectorCopy (accel, p.accel); - p.alpha = 1.0f; - - p.alphavel = -1.0f / (0.5f + Globals.rnd.nextFloat() * alphavel); - // p.alphavel = alphavel; - } - } - /* * =============== CL_BubbleTrail2 (lets you control the # of bubbles by * setting the distance between the spawns) @@ -772,42 +635,9 @@ public class CL_newfx { } - static void Tracker_Explode(float[] origin) { - float[] dir = new float[3]; - float[] backdir = new float[3]; - int i; - cparticle_t p; - - for (i = 0; i < 300; 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 = 1.0f; - p.alphavel = -1.0f; - p.color = 0; - - dir[0] = Lib.crand(); - dir[1] = Lib.crand(); - dir[2] = Lib.crand(); - Math3D.VectorNormalize(dir); - Math3D.VectorScale(dir, -1, backdir); - - Math3D.VectorMA(origin, 64, dir, p.org); - Math3D.VectorScale(backdir, 64, p.vel); - } - - } - /* - * =============== CL_TagTrail - * + * =============== + * CL_TagTrail * =============== */ static void TagTrail(float[] start, float[] end, float color) { diff --git a/src/jake2/client/CL_tent.java b/src/jake2/client/CL_tent.java index cb05e12..f6d9bec 100644 --- a/src/jake2/client/CL_tent.java +++ b/src/jake2/client/CL_tent.java @@ -2,7 +2,7 @@ * java * Copyright (C) 2004 * - * $Id: CL_tent.java,v 1.6 2004-10-04 12:50:37 hzi Exp $ + * $Id: CL_tent.java,v 1.7 2004-10-11 14:04:16 hzi Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -385,25 +385,9 @@ public class CL_tent { } /* - * ================= CL_ParseParticles ================= - */ - static void ParseParticles() { - int color, count; - float[] pos = new float[3]; - float[] dir = new float[3]; - - MSG.ReadPos(Globals.net_message, pos); - MSG.ReadDir(Globals.net_message, dir); - - color = MSG.ReadByte(Globals.net_message); - - count = MSG.ReadByte(Globals.net_message); - - CL_fx.ParticleEffect(pos, dir, color, count); - } - - /* - * ================= CL_ParseBeam ================= + * ================= + * CL_ParseBeam + * ================= */ static int ParseBeam(model_t model) { int ent; @@ -1280,7 +1264,6 @@ public class CL_tent { MSG.ReadPos(Globals.net_message, pos); CL_newfx.ColorFlash(pos, 0, 150, -1, -1, -1); CL_newfx.ColorExplosionParticles(pos, 0, 1); - // CL_Tracker_Explode (pos); S.StartSound(pos, 0, 0, cl_sfx_disrexp, 1, Defines.ATTN_NORM, 0); break; |