{
int myrandx,myrandy,myrandr;
if((rand()%10000)<=parts[i].temp){<br/>
myrandx=rand()%3-1+x;
myrandy=rand()%3-1+y;
myrandr=pmap[myrandy][myrandx];
if ((myrandr&0xff)==PT_NONE){
create_part(-1,myrandx,myrandy,PT_IRPH);
parts[myrandr>>8].temp=parts[i].temp*200;
}
}
}
parts[myrandr>>8].temp=parts[i].temp;
parts[myrandr>>8].temp=parts[i].temp*200;
parts[0].temp=parts[i].temp;
jacksonmj:
You set myrandr to pmap[myrandy][myrandx]. If this place is empty, myrandr will be equal to zero.
pmap is updated by create_part, but myrandr is not updated. myrandr is still equal to zero. Effectively what you are doing isparts[0].temp=parts[i].temp;
create_part returns the ID of the created particle - use it!