Skip to content

Commit

Permalink
Fix ctrl+MIX not actually doing anything, and shift+MIX being too pow…
Browse files Browse the repository at this point in the history
…erful
  • Loading branch information
jacob1 committed Apr 27, 2016
1 parent 57be4ef commit 1c15b42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/simulation/simtools/Mix.cpp
Expand Up @@ -17,7 +17,7 @@ int Tool_Mix::Perform(Simulation * sim, Particle * cpart, int x, int y, float st
if(rand() % 100 != 0)
return 0;

int distance = strength * 10;
int distance = (int)(std::pow(strength, .5) * 10);

if(!(sim->elements[thisPart&0xFF].Properties & TYPE_PART))
return 0;
Expand All @@ -42,6 +42,8 @@ int Tool_Mix::Perform(Simulation * sim, Particle * cpart, int x, int y, float st
sim->pmap[newY][newX] = thisPart;
sim->parts[thisPart>>8].x = newX;
sim->parts[thisPart>>8].y = newY;

return 1;
}

Tool_Mix::~Tool_Mix() {}

0 comments on commit 1c15b42

Please sign in to comment.