mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-01 06:00:15 +02:00
TPT: Make ELEC+water form H2 and O2 in the correct proportions 9b2c2a78a6
This commit is contained in:
@@ -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(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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user