mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-11 10:54:15 +02:00
I guess if we're trying to save instructions, we should do it like this
This commit is contained in:
@@ -76,8 +76,9 @@ int Element_O2::update(UPDATE_FUNC_ARGS)
|
|||||||
}
|
}
|
||||||
if (parts[i].temp > 9973.15 && sim->pv[y/CELL][x/CELL] > 250.0f)
|
if (parts[i].temp > 9973.15 && sim->pv[y/CELL][x/CELL] > 250.0f)
|
||||||
{
|
{
|
||||||
float gravx = sim->gravx[((y/CELL)*(XRES/CELL))+(x/CELL)];
|
int gravPos = ((y/CELL)*(XRES/CELL))+(x/CELL);
|
||||||
float gravy = sim->gravy[((y/CELL)*(XRES/CELL))+(x/CELL)];
|
float gravx = sim->gravx[gravPos];
|
||||||
|
float gravy = sim->gravy[gravPos];
|
||||||
if (gravx*gravx + gravy*gravy > 400)
|
if (gravx*gravx + gravy*gravy > 400)
|
||||||
{
|
{
|
||||||
if (!(rand()%5))
|
if (!(rand()%5))
|
||||||
|
Reference in New Issue
Block a user