diff options
Diffstat (limited to 'src/simulation/tools/Cool.cpp')
| -rw-r--r-- | src/simulation/tools/Cool.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/simulation/tools/Cool.cpp b/src/simulation/tools/Cool.cpp index 12a6b28..b1b57b1 100644 --- a/src/simulation/tools/Cool.cpp +++ b/src/simulation/tools/Cool.cpp @@ -13,6 +13,10 @@ int Tool_Cool::Perform(Simulation * sim, Particle * cpart, int x, int y, float s if(!cpart) return 0; cpart->temp -= strength; + if(cpart->temp > MAX_TEMP) + cpart->temp = MAX_TEMP; + if(cpart->temp < 0) + cpart->temp = 0; return 1; } |
