Better scattering for QRTZ
This commit is contained in:
parent
18990e9746
commit
218c14c5ea
@ -40,17 +40,13 @@ int update_PHOT(UPDATE_FUNC_ARGS) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
r = pmap[y][x];
|
r = pmap[y][x];
|
||||||
if((r&0xFF) == PT_QRTZ && r)
|
if((r&0xFF) == PT_QRTZ && r)// && parts[i].ctype==0x3FFFFFFF)
|
||||||
{
|
{
|
||||||
int t1, t2, t3;
|
float a = (rand()%360)*3.14159f/180.0f;
|
||||||
parts[i].vx += ((float)(rand()%1000-500))/1000.0f;
|
parts[i].vx = 3.0f*cosf(a);
|
||||||
parts[i].vy += ((float)(rand()%1000-500))/1000.0f;
|
parts[i].vy = 3.0f*sinf(a);
|
||||||
t1 = (parts[i].ctype & 0x0000FF)+(rand()%5)-2;
|
parts[i].ctype = 0x1F<<(rand()%26);
|
||||||
t2 = ((parts[i].ctype & 0x00FF00)>>8)+(rand()%5)-2;
|
parts[i].life++; //Delay death
|
||||||
t3 = ((parts[i].ctype & 0xFF0000)>>16)+(rand()%5)-2;
|
|
||||||
parts[i].ctype = (parts[i].ctype & 0xFF000000) | (t3<<16) | (t2<<8) | t1;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//r = pmap[y][x];
|
//r = pmap[y][x];
|
||||||
//rt = r&0xFF;
|
//rt = r&0xFF;
|
||||||
|
Reference in New Issue
Block a user