TPT: Make ELEC+water form H2 and O2 in the correct proportions 9b2c2a78a6
This commit is contained in:
parent
6dc7eaf43e
commit
57c356e495
@ -95,14 +95,14 @@ int Element_ELEC::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW)
|
if ((r&0xFF)==PT_WATR || (r&0xFF)==PT_DSTW || (r&0xFF)==PT_SLTW || (r&0xFF)==PT_CBNW)
|
||||||
{
|
{
|
||||||
if(rand()%2)
|
if(rand()<RAND_MAX/3)
|
||||||
{
|
{
|
||||||
sim->create_part(r>>8, x+rx, y+ry, PT_H2);
|
sim->create_part(r>>8, x+rx, y+ry, PT_O2);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sim->create_part(r>>8, x+rx, y+ry, PT_O2);
|
sim->create_part(r>>8, x+rx, y+ry, PT_H2);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user