diff options
Diffstat (limited to 'src/simulation/tools/Air.cpp')
| -rw-r--r-- | src/simulation/tools/Air.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/simulation/tools/Air.cpp b/src/simulation/tools/Air.cpp index b7b1351..9fd7f79 100644 --- a/src/simulation/tools/Air.cpp +++ b/src/simulation/tools/Air.cpp @@ -12,6 +12,10 @@ Tool_Air::Tool_Air() int Tool_Air::Perform(Simulation * sim, Particle * cpart, int x, int y, float strength) { sim->air->pv[y/CELL][x/CELL] += 0.03f*strength; + if(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) + sim->air->pv[y/CELL][x/CELL] = -256.0f; return 1; } |
