Permalink
Browse files

Add control of gravity strength using tmp to WHOL

  • Loading branch information...
jacksonmj committed Jul 26, 2016
1 parent 6eb8322 commit 4f8f97d04b0a1f444ef0bddf693b9f8162b900b7
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/simulation/elements/NWHL.cpp
@@ -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;
}

0 comments on commit 4f8f97d

Please sign in to comment.