Skip to content

Commit

Permalink
Add control of gravity strength using tmp to WHOL
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonmj committed Jul 26, 2016
1 parent 6eb8322 commit 4f8f97d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/simulation/elements/NWHL.cpp
Expand Up @@ -47,7 +47,10 @@ Element_NWHL::Element_NWHL()
//#TPT-Directive ElementHeader Element_NWHL static int update(UPDATE_FUNC_ARGS)
int Element_NWHL::update(UPDATE_FUNC_ARGS)
{
sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= 0.1f;
if (parts[i].tmp)
sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= restrict_flt(0.001f*parts[i].tmp, 0.1f, 51.2f);
else
sim->gravmap[(y/CELL)*(XRES/CELL)+(x/CELL)] -= 0.1f;
return 0;
}

Expand Down

0 comments on commit 4f8f97d

Please sign in to comment.