From: Holger Z. <hz...@us...> - 2004-10-11 14:05:39
|
Update of /cvsroot/jake2/jake2/src/jake2/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29003/src/jake2/client Modified Files: CL_ents.java CL.java CL_tent.java CL_newfx.java CL_fx.java Log Message: remove some unreferenced functions Index: CL_newfx.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_newfx.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CL_newfx.java 4 Oct 2004 12:50:37 -0000 1.5 --- CL_newfx.java 11 Oct 2004 14:04:16 -0000 1.6 *************** *** 134,181 **** } - /* - * =============== 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]; --- 134,137 ---- *************** *** 224,320 **** } - // 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 --- 180,183 ---- *************** *** 773,812 **** } - 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 ! * * =============== */ --- 636,642 ---- } /* ! * =============== ! * CL_TagTrail * =============== */ Index: CL_ents.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_ents.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CL_ents.java 22 Sep 2004 19:22:07 -0000 1.6 --- CL_ents.java 11 Oct 2004 14:04:16 -0000 1.7 *************** *** 28,38 **** 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.util.Math3D; --- 28,33 ---- import jake2.Defines; import jake2.Globals; ! import jake2.game.*; ! import jake2.qcommon.*; import jake2.util.Math3D; *************** *** 589,644 **** */ - 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 ! * * =============== */ --- 584,590 ---- */ /* ! * =============== ! * CL_AddPacketEntities * =============== */ Index: CL_fx.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_fx.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CL_fx.java 22 Sep 2004 19:22:08 -0000 1.6 --- CL_fx.java 11 Oct 2004 14:04:16 -0000 1.7 *************** *** 52,56 **** float die; // stop lighting after this time - //float decay; // drop this each second float minlight; // don't add when contributing less --- 52,55 ---- *************** *** 231,251 **** } - /* - * =============== 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 ! * * =============== */ --- 230,237 ---- } /* ! * =============== ! * CL_RunDLights * =============== */ *************** *** 262,273 **** return; } - //dl[i].radius -= cls.frametime * dl[i].decay; - //if (dl[i].radius < 0) - // dl[i].radius = 0; } } /* ! * ============== CL_ParseMuzzleFlash ============== */ static void ParseMuzzleFlash() { --- 248,258 ---- return; } } } /* ! * ============== ! * CL_ParseMuzzleFlash ! * ============== */ static void ParseMuzzleFlash() { *************** *** 1370,1422 **** } - /* - * =============== 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 ! * * =============== */ --- 1355,1362 ---- } /* ! * =============== ! * CL_FlagTrail * =============== */ Index: CL_tent.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL_tent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CL_tent.java 4 Oct 2004 12:50:37 -0000 1.6 --- CL_tent.java 11 Oct 2004 14:04:16 -0000 1.7 *************** *** 386,408 **** /* ! * ================= 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 ================= */ static int ParseBeam(model_t model) { --- 386,392 ---- /* ! * ================= ! * CL_ParseBeam ! * ================= */ static int ParseBeam(model_t model) { *************** *** 1281,1285 **** 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; --- 1265,1268 ---- Index: CL.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/client/CL.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CL.java 4 Oct 2004 12:50:37 -0000 1.12 --- CL.java 11 Oct 2004 14:04:16 -0000 1.13 *************** *** 878,893 **** } - /* - * ================= 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"); - } - } /* --- 878,881 ---- |