Add control of gravity strength using tmp to WHOL

This commit is contained in:
jacksonmj 2016-07-26 23:24:56 +01:00
parent 6eb832207c
commit 4f8f97d04b

View File

@ -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;
}