MCPcopy Create free account
hub / github.com/demoth/jake2 / DebugTrail

Method DebugTrail

client/src/main/java/jake2/client/CL_newfx.java:86–134  ·  view source on GitHub ↗
(float[] start, float[] end)

Source from the content-addressed store, hash-verified

84 * ====== CL_DebugTrail ======
85 */
86 static void DebugTrail(float[] start, float[] end) {
87 float len;
88 // int j;
89 cparticle_t p;
90 float dec;
91 // int i;
92 // float d, c, s;
93 // float[] dir;
94
95 Math3D.VectorCopy(start, move);
96 Math3D.VectorSubtract(end, start, vec);
97 len = Math3D.VectorNormalize(vec);
98
99 Math3D.MakeNormalVectors(vec, right, up);
100
101 // VectorScale(vec, RT2_SKIP, vec);
102
103 // dec = 1.0;
104 // dec = 0.75;
105 dec = 3;
106 Math3D.VectorScale(vec, dec, vec);
107 Math3D.VectorCopy(start, move);
108
109 while (len > 0) {
110 len -= dec;
111
112 if (CL_fx.free_particles == null)
113 return;
114 p = CL_fx.free_particles;
115 CL_fx.free_particles = p.next;
116 p.next = CL_fx.active_particles;
117 CL_fx.active_particles = p;
118
119 p.time = ClientGlobals.cl.time;
120 Math3D.VectorClear(p.accel);
121 Math3D.VectorClear(p.vel);
122 p.alpha = 1.0f;
123 p.alphavel = -0.1f;
124 // p.alphavel = 0;
125 p.color = 0x74 + (Lib.rand() & 7);
126 Math3D.VectorCopy(move, p.org);
127 /*
128 * for (j=0 ; j <3 ; j++) { p.org[j] = move[j] + crand()*2; p.vel[j] =
129 * crand()*3; p.accel[j] = 0; }
130 */
131 Math3D.VectorAdd(move, vec, move);
132 }
133
134 }
135
136 // stack variable
137 // move, vec

Callers 1

ParseTEntMethod · 0.95

Calls 8

VectorCopyMethod · 0.95
VectorSubtractMethod · 0.95
VectorNormalizeMethod · 0.95
MakeNormalVectorsMethod · 0.95
VectorScaleMethod · 0.95
VectorClearMethod · 0.95
randMethod · 0.95
VectorAddMethod · 0.95

Tested by

no test coverage detected