mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-07-31 05:30:23 +02:00
Add control of gravity strength using tmp to WHOL
This commit is contained in:
@@ -47,7 +47,10 @@ Element_NWHL::Element_NWHL()
|
|||||||
//#TPT-Directive ElementHeader Element_NWHL static int update(UPDATE_FUNC_ARGS)
|
//#TPT-Directive ElementHeader Element_NWHL static int update(UPDATE_FUNC_ARGS)
|
||||||
int Element_NWHL::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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user