Lines Matching refs:p
71 particle_t *p; in R_DarkFieldParticles() local
85 p = free_particles; in R_DarkFieldParticles()
86 free_particles = p->next; in R_DarkFieldParticles()
87 p->next = active_particles; in R_DarkFieldParticles()
88 active_particles = p; in R_DarkFieldParticles()
90 p->die = cl.time + 0.2 + (rand()&7) * 0.02; in R_DarkFieldParticles()
91 p->color = 150 + rand()%6; in R_DarkFieldParticles()
92 p->type = pt_slowgrav; in R_DarkFieldParticles()
98 p->org[0] = org[0] + i + (rand()&3); in R_DarkFieldParticles()
99 p->org[1] = org[1] + j + (rand()&3); in R_DarkFieldParticles()
100 p->org[2] = org[2] + k + (rand()&3); in R_DarkFieldParticles()
104 VectorScale (dir, vel, p->vel); in R_DarkFieldParticles()
128 particle_t *p; in R_EntityParticles() local
162 p = free_particles; in R_EntityParticles()
163 free_particles = p->next; in R_EntityParticles()
164 p->next = active_particles; in R_EntityParticles()
165 active_particles = p; in R_EntityParticles()
167 p->die = cl.time + 0.01; in R_EntityParticles()
168 p->color = 0x6f; in R_EntityParticles()
169 p->type = pt_explode; in R_EntityParticles()
171 p->org[0] = ent->origin[0] + r_avertexnormals[i][0]*dist + forward[0]*beamlength; in R_EntityParticles()
172 p->org[1] = ent->origin[1] + r_avertexnormals[i][1]*dist + forward[1]*beamlength; in R_EntityParticles()
173 p->org[2] = ent->origin[2] + r_avertexnormals[i][2]*dist + forward[2]*beamlength; in R_EntityParticles()
202 particle_t *p; in R_ReadPointFile_f() local
228 p = free_particles; in R_ReadPointFile_f()
229 free_particles = p->next; in R_ReadPointFile_f()
230 p->next = active_particles; in R_ReadPointFile_f()
231 active_particles = p; in R_ReadPointFile_f()
233 p->die = 99999; in R_ReadPointFile_f()
234 p->color = (-c)&15; in R_ReadPointFile_f()
235 p->type = pt_static; in R_ReadPointFile_f()
236 VectorCopy (vec3_origin, p->vel); in R_ReadPointFile_f()
237 VectorCopy (org, p->org); in R_ReadPointFile_f()
280 particle_t *p; in R_ParticleExplosion() local
286 p = free_particles; in R_ParticleExplosion()
287 free_particles = p->next; in R_ParticleExplosion()
288 p->next = active_particles; in R_ParticleExplosion()
289 active_particles = p; in R_ParticleExplosion()
291 p->die = cl.time + 5; in R_ParticleExplosion()
292 p->color = ramp1[0]; in R_ParticleExplosion()
293 p->ramp = rand()&3; in R_ParticleExplosion()
296 p->type = pt_explode; in R_ParticleExplosion()
299 p->org[j] = org[j] + ((rand()%32)-16); in R_ParticleExplosion()
300 p->vel[j] = (rand()%512)-256; in R_ParticleExplosion()
305 p->type = pt_explode2; in R_ParticleExplosion()
308 p->org[j] = org[j] + ((rand()%32)-16); in R_ParticleExplosion()
309 p->vel[j] = (rand()%512)-256; in R_ParticleExplosion()
324 particle_t *p; in R_ParticleExplosion2() local
331 p = free_particles; in R_ParticleExplosion2()
332 free_particles = p->next; in R_ParticleExplosion2()
333 p->next = active_particles; in R_ParticleExplosion2()
334 active_particles = p; in R_ParticleExplosion2()
336 p->die = cl.time + 0.3; in R_ParticleExplosion2()
337 p->color = colorStart + (colorMod % colorLength); in R_ParticleExplosion2()
340 p->type = pt_blob; in R_ParticleExplosion2()
343 p->org[j] = org[j] + ((rand()%32)-16); in R_ParticleExplosion2()
344 p->vel[j] = (rand()%512)-256; in R_ParticleExplosion2()
358 particle_t *p; in R_BlobExplosion() local
364 p = free_particles; in R_BlobExplosion()
365 free_particles = p->next; in R_BlobExplosion()
366 p->next = active_particles; in R_BlobExplosion()
367 active_particles = p; in R_BlobExplosion()
369 p->die = cl.time + 1 + (rand()&8)*0.05; in R_BlobExplosion()
373 p->type = pt_blob; in R_BlobExplosion()
374 p->color = 66 + rand()%6; in R_BlobExplosion()
377 p->org[j] = org[j] + ((rand()%32)-16); in R_BlobExplosion()
378 p->vel[j] = (rand()%512)-256; in R_BlobExplosion()
383 p->type = pt_blob2; in R_BlobExplosion()
384 p->color = 150 + rand()%6; in R_BlobExplosion()
387 p->org[j] = org[j] + ((rand()%32)-16); in R_BlobExplosion()
388 p->vel[j] = (rand()%512)-256; in R_BlobExplosion()
403 particle_t *p; in R_RunParticleEffect() local
409 p = free_particles; in R_RunParticleEffect()
410 free_particles = p->next; in R_RunParticleEffect()
411 p->next = active_particles; in R_RunParticleEffect()
412 active_particles = p; in R_RunParticleEffect()
416 p->die = cl.time + 5; in R_RunParticleEffect()
417 p->color = ramp1[0]; in R_RunParticleEffect()
418 p->ramp = rand()&3; in R_RunParticleEffect()
421 p->type = pt_explode; in R_RunParticleEffect()
424 p->org[j] = org[j] + ((rand()%32)-16); in R_RunParticleEffect()
425 p->vel[j] = (rand()%512)-256; in R_RunParticleEffect()
430 p->type = pt_explode2; in R_RunParticleEffect()
433 p->org[j] = org[j] + ((rand()%32)-16); in R_RunParticleEffect()
434 p->vel[j] = (rand()%512)-256; in R_RunParticleEffect()
440 p->die = cl.time + 0.1*(rand()%5); in R_RunParticleEffect()
441 p->color = (color&~7) + (rand()&7); in R_RunParticleEffect()
442 p->type = pt_slowgrav; in R_RunParticleEffect()
445 p->org[j] = org[j] + ((rand()&15)-8); in R_RunParticleEffect()
446 p->vel[j] = dir[j]*15;// + (rand()%300)-150; in R_RunParticleEffect()
462 particle_t *p; in R_LavaSplash() local
472 p = free_particles; in R_LavaSplash()
473 free_particles = p->next; in R_LavaSplash()
474 p->next = active_particles; in R_LavaSplash()
475 active_particles = p; in R_LavaSplash()
477 p->die = cl.time + 2 + (rand()&31) * 0.02; in R_LavaSplash()
478 p->color = 224 + (rand()&7); in R_LavaSplash()
479 p->type = pt_slowgrav; in R_LavaSplash()
485 p->org[0] = org[0] + dir[0]; in R_LavaSplash()
486 p->org[1] = org[1] + dir[1]; in R_LavaSplash()
487 p->org[2] = org[2] + (rand()&63); in R_LavaSplash()
491 VectorScale (dir, vel, p->vel); in R_LavaSplash()
504 particle_t *p; in R_TeleportSplash() local
514 p = free_particles; in R_TeleportSplash()
515 free_particles = p->next; in R_TeleportSplash()
516 p->next = active_particles; in R_TeleportSplash()
517 active_particles = p; in R_TeleportSplash()
519 p->die = cl.time + 0.2 + (rand()&7) * 0.02; in R_TeleportSplash()
520 p->color = 7 + (rand()&7); in R_TeleportSplash()
521 p->type = pt_slowgrav; in R_TeleportSplash()
527 p->org[0] = org[0] + i + (rand()&3); in R_TeleportSplash()
528 p->org[1] = org[1] + j + (rand()&3); in R_TeleportSplash()
529 p->org[2] = org[2] + k + (rand()&3); in R_TeleportSplash()
533 VectorScale (dir, vel, p->vel); in R_TeleportSplash()
542 particle_t *p; in R_RocketTrail() local
562 p = free_particles; in R_RocketTrail()
563 free_particles = p->next; in R_RocketTrail()
564 p->next = active_particles; in R_RocketTrail()
565 active_particles = p; in R_RocketTrail()
567 VectorCopy (vec3_origin, p->vel); in R_RocketTrail()
568 p->die = cl.time + 2; in R_RocketTrail()
573 p->ramp = (rand()&3); in R_RocketTrail()
574 p->color = ramp3[(int)p->ramp]; in R_RocketTrail()
575 p->type = pt_fire; in R_RocketTrail()
577 p->org[j] = start[j] + ((rand()%6)-3); in R_RocketTrail()
581 p->ramp = (rand()&3) + 2; in R_RocketTrail()
582 p->color = ramp3[(int)p->ramp]; in R_RocketTrail()
583 p->type = pt_fire; in R_RocketTrail()
585 p->org[j] = start[j] + ((rand()%6)-3); in R_RocketTrail()
589 p->type = pt_grav; in R_RocketTrail()
590 p->color = 67 + (rand()&3); in R_RocketTrail()
592 p->org[j] = start[j] + ((rand()%6)-3); in R_RocketTrail()
597 p->die = cl.time + 0.5; in R_RocketTrail()
598 p->type = pt_static; in R_RocketTrail()
600 p->color = 52 + ((tracercount&4)<<1); in R_RocketTrail()
602 p->color = 230 + ((tracercount&4)<<1); in R_RocketTrail()
606 VectorCopy (start, p->org); in R_RocketTrail()
609 p->vel[0] = 30*vec[1]; in R_RocketTrail()
610 p->vel[1] = 30*-vec[0]; in R_RocketTrail()
614 p->vel[0] = 30*-vec[1]; in R_RocketTrail()
615 p->vel[1] = 30*vec[0]; in R_RocketTrail()
620 p->type = pt_grav; in R_RocketTrail()
621 p->color = 67 + (rand()&3); in R_RocketTrail()
623 p->org[j] = start[j] + ((rand()%6)-3); in R_RocketTrail()
628 p->color = 9*16 + 8 + (rand()&3); in R_RocketTrail()
629 p->type = pt_static; in R_RocketTrail()
630 p->die = cl.time + 0.3; in R_RocketTrail()
632 p->org[j] = start[j] + ((rand()&15)-8); in R_RocketTrail()
651 particle_t *p, *kill; in R_DrawParticles() local
713 for (p=active_particles ; p ; p=p->next) in R_DrawParticles()
717 kill = p->next; in R_DrawParticles()
720 p->next = kill->next; in R_DrawParticles()
730 scale = (p->org[0] - r_origin[0])*vpn[0] + (p->org[1] - r_origin[1])*vpn[1] in R_DrawParticles()
731 + (p->org[2] - r_origin[2])*vpn[2]; in R_DrawParticles()
747 memcpy(pColor, (byte *)&d_8to24table[(int)p->color], 3); in R_DrawParticles()
752 *pPos++ = p->org[0]; in R_DrawParticles()
753 *pPos++ = p->org[1]; in R_DrawParticles()
754 *pPos++ = p->org[2]; in R_DrawParticles()
756 memcpy(pColor, (byte *)&d_8to24table[(int)p->color], 3); in R_DrawParticles()
761 *pPos++ = p->org[0] + up[0]*scale; in R_DrawParticles()
762 *pPos++ = p->org[1] + up[1]*scale; in R_DrawParticles()
763 *pPos++ = p->org[2] + up[2]*scale; in R_DrawParticles()
765 memcpy(pColor, (byte *)&d_8to24table[(int)p->color], 3); in R_DrawParticles()
770 *pPos++ = p->org[0] + right[0]*scale; in R_DrawParticles()
771 *pPos++ = p->org[1] + right[1]*scale; in R_DrawParticles()
772 *pPos++ = p->org[2] + right[2]*scale; in R_DrawParticles()
777 glColor3ubv ((byte *)&d_8to24table[(int)p->color]); in R_DrawParticles()
779 glVertex3fv (p->org); in R_DrawParticles()
781 glVertex3f (p->org[0] + up[0]*scale, p->org[1] + up[1]*scale, p->org[2] + up[2]*scale); in R_DrawParticles()
783 glVertex3f (p->org[0] + right[0]*scale, p->org[1] + right[1]*scale, p->org[2] + right[2]*scale); in R_DrawParticles()
786 D_DrawParticle (p); in R_DrawParticles()
788 p->org[0] += p->vel[0]*frametime; in R_DrawParticles()
789 p->org[1] += p->vel[1]*frametime; in R_DrawParticles()
790 p->org[2] += p->vel[2]*frametime; in R_DrawParticles()
792 switch (p->type) in R_DrawParticles()
797 p->ramp += time1; in R_DrawParticles()
798 if (p->ramp >= 6) in R_DrawParticles()
799 p->die = -1; in R_DrawParticles()
801 p->color = ramp3[(int)p->ramp]; in R_DrawParticles()
802 p->vel[2] += grav; in R_DrawParticles()
806 p->ramp += time2; in R_DrawParticles()
807 if (p->ramp >=8) in R_DrawParticles()
808 p->die = -1; in R_DrawParticles()
810 p->color = ramp1[(int)p->ramp]; in R_DrawParticles()
812 p->vel[i] += p->vel[i]*dvel; in R_DrawParticles()
813 p->vel[2] -= grav; in R_DrawParticles()
817 p->ramp += time3; in R_DrawParticles()
818 if (p->ramp >=8) in R_DrawParticles()
819 p->die = -1; in R_DrawParticles()
821 p->color = ramp2[(int)p->ramp]; in R_DrawParticles()
823 p->vel[i] -= p->vel[i]*frametime; in R_DrawParticles()
824 p->vel[2] -= grav; in R_DrawParticles()
829 p->vel[i] += p->vel[i]*dvel; in R_DrawParticles()
830 p->vel[2] -= grav; in R_DrawParticles()
835 p->vel[i] -= p->vel[i]*dvel; in R_DrawParticles()
836 p->vel[2] -= grav; in R_DrawParticles()
841 p->vel[2] -= grav * 20; in R_DrawParticles()
845 p->vel[2] -= grav; in R_DrawParticles()