diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2011-09-16 08:07:34 +0000 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2011-09-16 12:44:44 +0200 |
commit | cba068c28251694a67a2e585a3ee92b2e4e69d5c (patch) | |
tree | dc7e1c55841fa55bb626ee0d0ac694440c2c1904 /crawl-ref/source/spl-tornado.cc | |
parent | 05972375c81d6b1c8f094c7b9911161e0e02afc8 (diff) | |
download | crawl-ref-cba068c28251694a67a2e585a3ee92b2e4e69d5c.tar.gz crawl-ref-cba068c28251694a67a2e585a3ee92b2e4e69d5c.zip |
Simplify.
Diffstat (limited to 'crawl-ref/source/spl-tornado.cc')
-rw-r--r-- | crawl-ref/source/spl-tornado.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crawl-ref/source/spl-tornado.cc b/crawl-ref/source/spl-tornado.cc index bfac49f12d..5b5a50ce0d 100644 --- a/crawl-ref/source/spl-tornado.cc +++ b/crawl-ref/source/spl-tornado.cc @@ -226,7 +226,7 @@ void tornado_damage(actor *caster, int dur) pow = caster->as_monster()->hit_dice * 4; dprf("Doing tornado, dur %d, effective power %d", dur, pow); const coord_def org = caster->pos(); - int max_noise = 0; + int noise = 0; WindSystem winds(org); int age = _tornado_age(caster); @@ -269,9 +269,7 @@ void tornado_damage(actor *caster, int dur) if (!rpow) break; - int noise = div_rand_round(r * rdur * 3, 100); - if (noise > max_noise) - max_noise = noise; + noise = std::max(div_rand_round(r * rdur * 3, 100), noise); std::vector<coord_def> clouds; for (; dam_i && dam_i.radius() == r; ++dam_i) @@ -371,7 +369,7 @@ void tornado_damage(actor *caster, int dur) } } - noisy(max_noise, org, caster->mindex()); + noisy(noise, org, caster->mindex()); if (dur <= 0) return; |