Less layering of particles in fusion

Fixes http://tpt.io/~1683916 - PLSM was created on top of DMND, which other particles then displaced, leading to lots of stacking and particles escaping through the DMND.
This commit is contained in:
jacksonmj 2014-11-30 17:11:15 +00:00
parent 70a815a8c7
commit e25fac5037
4 changed files with 13 additions and 13 deletions

View File

@ -92,12 +92,12 @@ int Element_CO2::update(UPDATE_FUNC_ARGS)
{
int j;
sim->create_part(i,x,y,PT_O2);
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT);
j = sim->create_part(-3,x,y,PT_NEUT);
if (j != -1)
parts[j].temp = MAX_TEMP;
if (!(rand()%50))
{
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC);
j = sim->create_part(-3,x,y,PT_ELEC);
if (j != -1)
parts[j].temp = MAX_TEMP;
}

View File

@ -101,23 +101,23 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
sim->create_part(i,x,y,PT_NBLE);
parts[i].tmp = 0x1;
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT);
j = sim->create_part(-3,x,y,PT_NEUT);
if (j>-1)
parts[j].temp = temp;
if (!(rand()%10))
{
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC);
j = sim->create_part(-3,x,y,PT_ELEC);
if (j>-1)
parts[j].temp = temp;
}
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
j = sim->create_part(-3,x,y,PT_PHOT);
if (j>-1)
{
parts[j].ctype = 0x7C0000;
parts[j].temp = temp;
parts[j].tmp = 0x1;
}
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
j = sim->create_part(-1,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
if (j>-1)
{
parts[j].temp = temp;

View File

@ -58,23 +58,23 @@ int Element_NBLE::update(UPDATE_FUNC_ARGS)
float temp = parts[i].temp;
sim->create_part(i,x,y,PT_CO2);
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT);
j = sim->create_part(-3,x,y,PT_NEUT);
if (j != -1)
parts[j].temp = temp;
if (!(rand()%25))
{
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC);
j = sim->create_part(-3,x,y,PT_ELEC);
if (j != -1)
parts[j].temp = temp;
}
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
j = sim->create_part(-3,x,y,PT_PHOT);
if (j != -1)
{
parts[j].ctype = 0xF800000;
parts[j].temp = temp;
parts[j].tmp = 0x1;
}
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
j = sim->create_part(-1,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
if (j != -1)
{
parts[j].temp = temp;

View File

@ -83,16 +83,16 @@ int Element_O2::update(UPDATE_FUNC_ARGS)
int j;
sim->create_part(i,x,y,PT_BRMT);
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT);
j = sim->create_part(-3,x,y,PT_NEUT);
if (j != -1)
parts[j].temp = MAX_TEMP;
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
j = sim->create_part(-3,x,y,PT_PHOT);
if (j != -1)
{
parts[j].temp = MAX_TEMP;
parts[j].tmp = 0x1;
}
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
j = sim->create_part(-1,x+rand()%3-1,y+rand()%3-1,PT_PLSM);
if (j != -1)
{
parts[j].temp = MAX_TEMP;