better way to prevent PROT in fusion

This commit is contained in:
jacob1 2014-01-06 22:52:47 -05:00
parent 4b28cdb6ba
commit 41cc0a398a
4 changed files with 6 additions and 1 deletions

View File

@ -2224,7 +2224,7 @@ int Simulation::try_move(int i, int x, int y, int nx, int ny)
part_change_type(i, x, y, PT_ELEC);
parts[i].ctype = 0;
}
else if ((r&0xFF) == PT_H2 && pv[y/CELL][x/CELL] < 45.0f && parts[i].temp < 3000)
else if ((r&0xFF) == PT_H2 && !(parts[i].tmp&0x1))
{
part_change_type(i, x, y, PT_PROT);
parts[i].ctype = 0;

View File

@ -111,6 +111,7 @@ int Element_H2::update(UPDATE_FUNC_ARGS)
{
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);
if (j>-1)

View File

@ -72,6 +72,7 @@ int Element_NBLE::update(UPDATE_FUNC_ARGS)
{
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);
if (j != -1)

View File

@ -88,7 +88,10 @@ int Element_O2::update(UPDATE_FUNC_ARGS)
parts[j].temp = MAX_TEMP;
j = sim->create_part(-3,x+rand()%3-1,y+rand()%3-1,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);
if (j != -1)
{