From: Rene S. <sa...@us...> - 2005-06-05 15:22:00
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30569/src/jake2/game Modified Files: entity_state_t.java Log Message: Array index out of bounds bug fixed (ent.number) Index: entity_state_t.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/entity_state_t.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** entity_state_t.java 23 Jan 2005 19:06:10 -0000 1.4 --- entity_state_t.java 5 Jun 2005 15:21:47 -0000 1.5 *************** *** 38,45 **** { this.surrounding_ent = ent; } ! /** edict index. */ ! public int number = -99999; public edict_t surrounding_ent = null; public float[] origin = { 0, 0, 0 }; --- 38,48 ---- { this.surrounding_ent = ent; + if (ent != null) + number = ent.index; } ! /** edict index. TODO: this is critical. The index has to be proper managed. */ ! public int number = 0; ! // TODO: why was this introduced? public edict_t surrounding_ent = null; public float[] origin = { 0, 0, 0 }; *************** *** 149,153 **** public void clear() { ! number = -99999; surrounding_ent = null; Math3D.VectorClear(origin); --- 152,157 ---- public void clear() { ! //TODO: this is critical. The index has to be proper managed. ! number = 0; surrounding_ent = null; Math3D.VectorClear(origin); |