better way to prevent PROT in fusion
This commit is contained in:
parent
4b28cdb6ba
commit
41cc0a398a
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user