- particle_t *part;
- int ptempcolor, ptempcolor2, pcr1, pcg1, pcb1, pcr2, pcg2, pcb2;
- ptempcolor = (pcolor1);
- ptempcolor2 = (pcolor2);
- pcr2 = ((ptempcolor2) >> 16) & 0xFF;
- pcg2 = ((ptempcolor2) >> 8) & 0xFF;
- pcb2 = (ptempcolor2) & 0xFF;
- if (ptempcolor != ptempcolor2)
- {
- pcr1 = ((ptempcolor) >> 16) & 0xFF;
- pcg1 = ((ptempcolor) >> 8) & 0xFF;
- pcb1 = (ptempcolor) & 0xFF;
- ptempcolor = rand() & 0xFF;
- pcr2 = (((pcr2 - pcr1) * ptempcolor) >> 8) + pcr1;
- pcg2 = (((pcg2 - pcg1) * ptempcolor) >> 8) + pcg1;
- pcb2 = (((pcb2 - pcb1) * ptempcolor) >> 8) + pcb1;
- }
- part = &particles[cl_numparticles++];
- memset(part, 0, sizeof(*part));
- part->type = (ptype);
- part->color[0] = pcr2;
- part->color[1] = pcg2;
- part->color[2] = pcb2;
- part->color[3] = 0xFF;
- part->orientation = porientation;
- part->texnum = ptex;
- part->blendmode = pblendmode;
- part->scalex = (pscalex);
- part->scaley = (pscaley);
- part->alpha = (palpha);
- part->alphafade = (palphafade);
- part->die = cl.time + (ptime);
- part->gravity = (pgravity);
- part->bounce = (pbounce);
- part->org[0] = (px);
- part->org[1] = (py);
- part->org[2] = (pz);
- part->vel[0] = (pvx);
- part->vel[1] = (pvy);
- part->vel[2] = (pvz);
- part->time2 = (ptime2);
- part->vel2[0] = (pvx2);
- part->vel2[1] = (pvy2);
- part->vel2[2] = (pvz2);
- part->friction = (pfriction);
- part->pressure = (ppressure);
- return part;
+ pcr1 = ((ptempcolor) >> 16) & 0xFF;
+ pcg1 = ((ptempcolor) >> 8) & 0xFF;
+ pcb1 = (ptempcolor) & 0xFF;
+ ptempcolor = rand() & 0xFF;
+ pcr2 = (((pcr2 - pcr1) * ptempcolor) >> 8) + pcr1;
+ pcg2 = (((pcg2 - pcg1) * ptempcolor) >> 8) + pcg1;
+ pcb2 = (((pcb2 - pcb1) * ptempcolor) >> 8) + pcb1;