Skip to content

Commit

Permalink
I guess if we're trying to save instructions, we should do it like this
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Mar 4, 2018
1 parent d666559 commit 5dd01e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/simulation/elements/O2.cpp
Expand Up @@ -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))
Expand Down

0 comments on commit 5dd01e9

Please sign in to comment.