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

Method ItemRespawnParticles

client/src/main/java/jake2/client/CL_fx.java:1172–1201  ·  view source on GitHub ↗
(float[] org)

Source from the content-addressed store, hash-verified

1170 * ===============
1171 */
1172 static void ItemRespawnParticles(float[] org) {
1173 int j;
1174 cparticle_t p;
1175
1176 for (int i = 0; i < 64; i++) {
1177 if (free_particles == null)
1178 return;
1179 p = free_particles;
1180 free_particles = p.next;
1181 p.next = active_particles;
1182 active_particles = p;
1183
1184 p.time = ClientGlobals.cl.time;
1185
1186 p.color = 0xd4 + (Lib.rand() & 3); // green
1187
1188 p.org[0] = org[0] + Lib.crandom() * 8;
1189 p.org[1] = org[1] + Lib.crandom() * 8;
1190 p.org[2] = org[2] + Lib.crandom() * 8;
1191
1192 for (j = 0; j < 3; j++)
1193 p.vel[j] = Lib.crandom() * 8;
1194
1195 p.accel[0] = p.accel[1] = 0;
1196 p.accel[2] = -PARTICLE_GRAVITY * 0.2f;
1197 p.alpha = 1.0f;
1198
1199 p.alphavel = -1.0f / (1.0f + Globals.rnd.nextFloat() * 0.3f);
1200 }
1201 }
1202
1203 /*
1204 * =============== CL_ExplosionParticles ===============

Callers 1

EntityEventMethod · 0.95

Calls 2

randMethod · 0.95
crandomMethod · 0.95

Tested by

no test coverage detected