TPT: fusion changes

This commit is contained in:
Simon Robertshaw 2012-06-12 19:11:57 +01:00
parent 7f921924f5
commit a93caaa3c7
2 changed files with 8 additions and 10 deletions

View File

@ -127,7 +127,7 @@ int Element_ELEC::update(UPDATE_FUNC_ARGS)
sim->kill_part(i);
return 1;
}
if ((sim->elements[r&0xFF].Properties & PROP_CONDUCTS) && ((r&0xFF)!=PT_H2||parts[i].tmp!=1))
if ((sim->elements[r&0xFF].Properties & PROP_CONDUCTS) && ((r&0xFF)!=PT_H2||parts[i].temp<2273.15))
{
sim->create_part(-1, x+rx, y+ry, PT_SPRK);
sim->kill_part(i);
@ -153,4 +153,4 @@ int Element_ELEC::graphics(GRAPHICS_FUNC_ARGS)
}
Element_ELEC::~Element_ELEC() {}
Element_ELEC::~Element_ELEC() {}

View File

@ -68,7 +68,7 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
}
if (parts[r>>8].temp > 2273.15)// && pv[y/CELL][x/CELL] > 50.0f)
continue;
if (parts[i].tmp != 1)
if (parts[i].temp < 2273.15)
{
if (rt==PT_FIRE)
{
@ -87,27 +87,25 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
}
if (parts[i].temp > 2273.15 && sim->pv[y/CELL][x/CELL] > 50.0f)
{
parts[i].tmp = 1;
if (rand()%5 < 1)
{
int j;
float temp = parts[i].temp;
sim->part_change_type(i,x,y,PT_PLSM);
parts[i].life = rand()%150+50;
sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT);
sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC);
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NEUT); if (j != -1) parts[j].temp = temp;
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_ELEC); if (j != -1) parts[j].temp = temp;
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_PHOT);
if (j != -1) { parts[j].ctype = 0xFFFF00; parts[j].temp = temp; }
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE);
if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE); if (j != -1) parts[j].temp = temp;
if (rand()%2)
{
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,PT_NBLE);
if (j != -1) { parts[j].tmp = 1; parts[j].temp = temp; }
}
parts[i].temp += 6000;
parts[i].temp += 750+rand()%500;
sim->pv[y/CELL][x/CELL] += 30;
}
}
@ -115,4 +113,4 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
}
Element_H2::~Element_H2() {}
Element_H2::~Element_H2() {}