Permalink
Browse files

I guess if we're trying to save instructions, we should do it like this

  • Loading branch information...
jacob1 committed Mar 4, 2018
1 parent d666559 commit 5dd01e9976378af4b2f29759e314bee133db00dc
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/simulation/elements/O2.cpp
@@ -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)
{
float gravx = sim->gravx[((y/CELL)*(XRES/CELL))+(x/CELL)];
float gravy = sim->gravy[((y/CELL)*(XRES/CELL))+(x/CELL)];
int gravPos = ((y/CELL)*(XRES/CELL))+(x/CELL);
float gravx = sim->gravx[gravPos];
float gravy = sim->gravy[gravPos];
if (gravx*gravx + gravy*gravy > 400)
{
if (!(rand()%5))

0 comments on commit 5dd01e9

Please sign in to comment.