Fixed photons spawning, but it's still have some bugs.
This commit is contained in:
parent
887895624c
commit
ec1ab3fbcf
17
powder.c
17
powder.c
@ -2442,8 +2442,23 @@ killed:
|
||||
{
|
||||
create_part(-1, nx, ny, player[2]);
|
||||
r = pmap[ny][nx];
|
||||
if( ((r>>8) < NPART) && (r>>8)>=0 )
|
||||
if( ((r>>8) < NPART) && (r>>8)>=0 && player[2]!=PT_PHOT)
|
||||
parts[r>>8].vx = parts[r>>8].vx + 5*((((int)player[1])&0x02) == 0x02) - 5*(((int)(player[1])&0x01) == 0x01);
|
||||
if(((r>>8) < NPART) && (r>>8)>=0 && player[2] == PT_PHOT)
|
||||
{
|
||||
int random = abs(rand()%3-1)*3;
|
||||
if (random==0)
|
||||
{
|
||||
parts[r>>8].life = 0;
|
||||
parts[r>>8].type = PT_NONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
parts[r>>8].vy = 0;
|
||||
parts[r>>8].vx = (((((int)player[1])&0x02) == 0x02) - (((int)(player[1])&0x01) == 0x01))*random;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user