Lines Matching refs:p
92 particle_t *p; in R_ReadPointFile_f() local
118 p = free_particles; in R_ReadPointFile_f()
119 free_particles = p->next; in R_ReadPointFile_f()
120 p->next = active_particles; in R_ReadPointFile_f()
121 active_particles = p; in R_ReadPointFile_f()
123 p->die = 99999; in R_ReadPointFile_f()
124 p->color = (-c)&15; in R_ReadPointFile_f()
125 p->type = pt_static; in R_ReadPointFile_f()
126 VectorCopy (vec3_origin, p->vel); in R_ReadPointFile_f()
127 VectorCopy (org, p->org); in R_ReadPointFile_f()
143 particle_t *p; in R_ParticleExplosion() local
149 p = free_particles; in R_ParticleExplosion()
150 free_particles = p->next; in R_ParticleExplosion()
151 p->next = active_particles; in R_ParticleExplosion()
152 active_particles = p; in R_ParticleExplosion()
154 p->die = cl.time + 5; in R_ParticleExplosion()
155 p->color = ramp1[0]; in R_ParticleExplosion()
156 p->ramp = rand()&3; in R_ParticleExplosion()
159 p->type = pt_explode; in R_ParticleExplosion()
162 p->org[j] = org[j] + ((rand()%32)-16); in R_ParticleExplosion()
163 p->vel[j] = (rand()%512)-256; in R_ParticleExplosion()
168 p->type = pt_explode2; in R_ParticleExplosion()
171 p->org[j] = org[j] + ((rand()%32)-16); in R_ParticleExplosion()
172 p->vel[j] = (rand()%512)-256; in R_ParticleExplosion()
187 particle_t *p; in R_BlobExplosion() local
193 p = free_particles; in R_BlobExplosion()
194 free_particles = p->next; in R_BlobExplosion()
195 p->next = active_particles; in R_BlobExplosion()
196 active_particles = p; in R_BlobExplosion()
198 p->die = cl.time + 1 + (rand()&8)*0.05; in R_BlobExplosion()
202 p->type = pt_blob; in R_BlobExplosion()
203 p->color = 66 + rand()%6; in R_BlobExplosion()
206 p->org[j] = org[j] + ((rand()%32)-16); in R_BlobExplosion()
207 p->vel[j] = (rand()%512)-256; in R_BlobExplosion()
212 p->type = pt_blob2; in R_BlobExplosion()
213 p->color = 150 + rand()%6; in R_BlobExplosion()
216 p->org[j] = org[j] + ((rand()%32)-16); in R_BlobExplosion()
217 p->vel[j] = (rand()%512)-256; in R_BlobExplosion()
232 particle_t *p; in R_RunParticleEffect() local
246 p = free_particles; in R_RunParticleEffect()
247 free_particles = p->next; in R_RunParticleEffect()
248 p->next = active_particles; in R_RunParticleEffect()
249 active_particles = p; in R_RunParticleEffect()
251 p->die = cl.time + 0.1*(rand()%5); in R_RunParticleEffect()
252 p->color = (color&~7) + (rand()&7); in R_RunParticleEffect()
253 p->type = pt_grav; in R_RunParticleEffect()
256 p->org[j] = org[j] + scale*((rand()&15)-8); in R_RunParticleEffect()
257 p->vel[j] = dir[j]*15;// + (rand()%300)-150; in R_RunParticleEffect()
272 particle_t *p; in R_LavaSplash() local
282 p = free_particles; in R_LavaSplash()
283 free_particles = p->next; in R_LavaSplash()
284 p->next = active_particles; in R_LavaSplash()
285 active_particles = p; in R_LavaSplash()
287 p->die = cl.time + 2 + (rand()&31) * 0.02; in R_LavaSplash()
288 p->color = 224 + (rand()&7); in R_LavaSplash()
289 p->type = pt_grav; in R_LavaSplash()
295 p->org[0] = org[0] + dir[0]; in R_LavaSplash()
296 p->org[1] = org[1] + dir[1]; in R_LavaSplash()
297 p->org[2] = org[2] + (rand()&63); in R_LavaSplash()
301 VectorScale (dir, vel, p->vel); in R_LavaSplash()
314 particle_t *p; in R_TeleportSplash() local
324 p = free_particles; in R_TeleportSplash()
325 free_particles = p->next; in R_TeleportSplash()
326 p->next = active_particles; in R_TeleportSplash()
327 active_particles = p; in R_TeleportSplash()
329 p->die = cl.time + 0.2 + (rand()&7) * 0.02; in R_TeleportSplash()
330 p->color = 7 + (rand()&7); in R_TeleportSplash()
331 p->type = pt_grav; in R_TeleportSplash()
337 p->org[0] = org[0] + i + (rand()&3); in R_TeleportSplash()
338 p->org[1] = org[1] + j + (rand()&3); in R_TeleportSplash()
339 p->org[2] = org[2] + k + (rand()&3); in R_TeleportSplash()
343 VectorScale (dir, vel, p->vel); in R_TeleportSplash()
352 particle_t *p; in R_RocketTrail() local
362 p = free_particles; in R_RocketTrail()
363 free_particles = p->next; in R_RocketTrail()
364 p->next = active_particles; in R_RocketTrail()
365 active_particles = p; in R_RocketTrail()
367 VectorCopy (vec3_origin, p->vel); in R_RocketTrail()
368 p->die = cl.time + 2; in R_RocketTrail()
372 p->type = pt_slowgrav; in R_RocketTrail()
373 p->color = 67 + (rand()&3); in R_RocketTrail()
375 p->org[j] = start[j] + ((rand()%6)-3); in R_RocketTrail()
380 p->type = pt_slowgrav; in R_RocketTrail()
381 p->color = 67 + (rand()&3); in R_RocketTrail()
383 p->org[j] = start[j] + ((rand()%6)-3); in R_RocketTrail()
387 p->color = 9*16 + 8 + (rand()&3); in R_RocketTrail()
388 p->type = pt_static; in R_RocketTrail()
389 p->die = cl.time + 0.3; in R_RocketTrail()
391 p->org[j] = start[j] + ((rand()&15)-8); in R_RocketTrail()
395 p->ramp = (rand()&3) + 2; in R_RocketTrail()
396 p->color = ramp3[(int)p->ramp]; in R_RocketTrail()
397 p->type = pt_fire; in R_RocketTrail()
399 p->org[j] = start[j] + ((rand()%6)-3); in R_RocketTrail()
403 p->ramp = (rand()&3); in R_RocketTrail()
404 p->color = ramp3[(int)p->ramp]; in R_RocketTrail()
405 p->type = pt_fire; in R_RocketTrail()
407 p->org[j] = start[j] + ((rand()%6)-3); in R_RocketTrail()
413 p->die = cl.time + 0.5; in R_RocketTrail()
414 p->type = pt_static; in R_RocketTrail()
416 p->color = 52 + ((tracercount&4)<<1); in R_RocketTrail()
418 p->color = 230 + ((tracercount&4)<<1); in R_RocketTrail()
422 VectorCopy (start, p->org); in R_RocketTrail()
425 p->vel[0] = 30*vec[1]; in R_RocketTrail()
426 p->vel[1] = 30*-vec[0]; in R_RocketTrail()
430 p->vel[0] = 30*-vec[1]; in R_RocketTrail()
431 p->vel[1] = 30*vec[0]; in R_RocketTrail()
449 particle_t *p, *kill; in R_DrawParticles() local
512 for (p=active_particles ; p ; p=p->next) in R_DrawParticles()
516 kill = p->next; in R_DrawParticles()
519 p->next = kill->next; in R_DrawParticles()
529 scale = (p->org[0] - r_origin[0])*vpn[0] + (p->org[1] - r_origin[1])*vpn[1] in R_DrawParticles()
530 + (p->org[2] - r_origin[2])*vpn[2]; in R_DrawParticles()
535 at = (byte *)&d_8to24table[(int)p->color]; in R_DrawParticles()
536 if (p->type==pt_fire) in R_DrawParticles()
537 theAlpha = 255*(6-p->ramp)/6; in R_DrawParticles()
551 glVertex3fv (p->org); in R_DrawParticles()
553 glVertex3f (p->org[0] + up[0]*scale, p->org[1] + up[1]*scale, p->org[2] + up[2]*scale); in R_DrawParticles()
555 glVertex3f (p->org[0] + right[0]*scale, p->org[1] + right[1]*scale, p->org[2] + right[2]*scale); in R_DrawParticles()
559 D_DrawParticle (p); in R_DrawParticles()
562 p->org[0] += p->vel[0]*frametime; in R_DrawParticles()
563 p->org[1] += p->vel[1]*frametime; in R_DrawParticles()
564 p->org[2] += p->vel[2]*frametime; in R_DrawParticles()
566 switch (p->type) in R_DrawParticles()
571 p->ramp += time1; in R_DrawParticles()
572 if (p->ramp >= 6) in R_DrawParticles()
573 p->die = -1; in R_DrawParticles()
575 p->color = ramp3[(int)p->ramp]; in R_DrawParticles()
576 p->vel[2] += grav; in R_DrawParticles()
580 p->ramp += time2; in R_DrawParticles()
581 if (p->ramp >=8) in R_DrawParticles()
582 p->die = -1; in R_DrawParticles()
584 p->color = ramp1[(int)p->ramp]; in R_DrawParticles()
586 p->vel[i] += p->vel[i]*dvel; in R_DrawParticles()
587 p->vel[2] -= grav; in R_DrawParticles()
591 p->ramp += time3; in R_DrawParticles()
592 if (p->ramp >=8) in R_DrawParticles()
593 p->die = -1; in R_DrawParticles()
595 p->color = ramp2[(int)p->ramp]; in R_DrawParticles()
597 p->vel[i] -= p->vel[i]*frametime; in R_DrawParticles()
598 p->vel[2] -= grav; in R_DrawParticles()
603 p->vel[i] += p->vel[i]*dvel; in R_DrawParticles()
604 p->vel[2] -= grav; in R_DrawParticles()
609 p->vel[i] -= p->vel[i]*dvel; in R_DrawParticles()
610 p->vel[2] -= grav; in R_DrawParticles()
615 p->vel[2] -= grav; in R_DrawParticles()