blob: a7635707ed085c0c4059988c2b8ef08b2bfa4588 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "ToolClasses.h"
#include "simulation/Simulation.h"
//#TPT-Directive ToolClass Tool_PGrv TOOL_PGRV 4
Tool_PGrv::Tool_PGrv()
{
Identifier = "DEFAULT_TOOL_PGRV";
Name = "PGRV";
Colour = PIXPACK(0xCCCCFF);
Description = "Creates a short-lasting gravity well.";
}
int Tool_PGrv::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
{
sim->gravmap[((y/CELL)*(XRES/CELL))+(x/CELL)] = strength*5.0f;
return 1;
}
Tool_PGrv::~Tool_PGrv() {}
|