mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-03-31 04:22:59 +02:00
Add control of gravity strength using tmp to WHOL
This commit is contained in:
parent
6eb832207c
commit
4f8f97d04b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user