mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-28 10:20:04 +02:00
adjust tool strengths a little, to make them a little faster
This commit is contained in:
@@ -11,7 +11,7 @@ Tool_Air::Tool_Air()
|
|||||||
|
|
||||||
int Tool_Air::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
int Tool_Air::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
||||||
{
|
{
|
||||||
sim->air->pv[y/CELL][x/CELL] += 0.03f*strength;
|
sim->air->pv[y/CELL][x/CELL] += strength*0.05f;
|
||||||
if(sim->air->pv[y/CELL][x/CELL] > 256.0f)
|
if(sim->air->pv[y/CELL][x/CELL] > 256.0f)
|
||||||
sim->air->pv[y/CELL][x/CELL] = 256.0f;
|
sim->air->pv[y/CELL][x/CELL] = 256.0f;
|
||||||
if(sim->air->pv[y/CELL][x/CELL] < -256.0f)
|
if(sim->air->pv[y/CELL][x/CELL] < -256.0f)
|
||||||
|
@@ -13,9 +13,9 @@ int Tool_Cool::Perform(Simulation * sim, Particle * cpart, int x, int y, float s
|
|||||||
if(!cpart)
|
if(!cpart)
|
||||||
return 0;
|
return 0;
|
||||||
if (cpart->type == PT_PUMP || cpart->type == PT_GPMP)
|
if (cpart->type == PT_PUMP || cpart->type == PT_GPMP)
|
||||||
cpart->temp -= .1f*strength;
|
cpart->temp -= strength*.1f;
|
||||||
else
|
else
|
||||||
cpart->temp -= strength;
|
cpart->temp -= strength*2.0f;
|
||||||
if(cpart->temp > MAX_TEMP)
|
if(cpart->temp > MAX_TEMP)
|
||||||
cpart->temp = MAX_TEMP;
|
cpart->temp = MAX_TEMP;
|
||||||
if(cpart->temp < 0)
|
if(cpart->temp < 0)
|
||||||
|
@@ -13,9 +13,9 @@ int Tool_Heat::Perform(Simulation * sim, Particle * cpart, int x, int y, float s
|
|||||||
if(!cpart)
|
if(!cpart)
|
||||||
return 0;
|
return 0;
|
||||||
if (cpart->type == PT_PUMP || cpart->type == PT_GPMP)
|
if (cpart->type == PT_PUMP || cpart->type == PT_GPMP)
|
||||||
cpart->temp += .1f*strength;
|
cpart->temp += strength*.1f;
|
||||||
else
|
else
|
||||||
cpart->temp += strength;
|
cpart->temp += strength*2.0f;
|
||||||
if(cpart->temp > MAX_TEMP)
|
if(cpart->temp > MAX_TEMP)
|
||||||
cpart->temp = MAX_TEMP;
|
cpart->temp = MAX_TEMP;
|
||||||
if(cpart->temp < 0)
|
if(cpart->temp < 0)
|
||||||
|
@@ -11,7 +11,7 @@ Tool_NGrv::Tool_NGrv()
|
|||||||
|
|
||||||
int Tool_NGrv::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
int Tool_NGrv::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
||||||
{
|
{
|
||||||
sim->gravmap[((y/CELL)*(XRES/CELL))+(x/CELL)] -= 0.03f*strength;
|
sim->gravmap[((y/CELL)*(XRES/CELL))+(x/CELL)] = strength*-5.0f;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ Tool_PGrv::Tool_PGrv()
|
|||||||
|
|
||||||
int Tool_PGrv::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
int Tool_PGrv::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
||||||
{
|
{
|
||||||
sim->gravmap[((y/CELL)*(XRES/CELL))+(x/CELL)] += 0.03f*strength;
|
sim->gravmap[((y/CELL)*(XRES/CELL))+(x/CELL)] = strength*5.0f;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@ Tool_Vac::Tool_Vac()
|
|||||||
|
|
||||||
int Tool_Vac::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
int Tool_Vac::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength)
|
||||||
{
|
{
|
||||||
sim->air->pv[y/CELL][x/CELL] -= 0.03f*strength;
|
sim->air->pv[y/CELL][x/CELL] -= strength*0.05f;;
|
||||||
if(sim->air->pv[y/CELL][x/CELL] > 256.0f)
|
if(sim->air->pv[y/CELL][x/CELL] > 256.0f)
|
||||||
sim->air->pv[y/CELL][x/CELL] = 256.0f;
|
sim->air->pv[y/CELL][x/CELL] = 256.0f;
|
||||||
if(sim->air->pv[y/CELL][x/CELL] < -256.0f)
|
if(sim->air->pv[y/CELL][x/CELL] < -256.0f)
|
||||||
|
Reference in New Issue
Block a user