summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-19 20:49:10 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-19 20:49:10 +0000
commit6b01cb1a8f1948b9a8a6fe6ea2c0be2cc082731c (patch)
tree9963706d082c368e162434d37931a2cf5c43aeb9 /crawl-ref/source/fight.cc
parenta3134276d2ef7f70921235cdb23168144dc04fd5 (diff)
downloadcrawl-ref-6b01cb1a8f1948b9a8a6fe6ea2c0be2cc082731c.tar.gz
crawl-ref-6b01cb1a8f1948b9a8a6fe6ea2c0be2cc082731c.zip
Simplify.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5990 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 9792d59602..2b1e89e019 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2680,10 +2680,7 @@ void melee_attack::player_calc_hit_damage()
// This doesn't actually modify damage. -- bwr
// It only chooses the appropriate verb.
- damage_done = player_weapon_type_modify( damage_done );
-
- if (damage_done < 0)
- damage_done = 0;
+ damage_done = std::max(0, player_weapon_type_modify(damage_done));
}
int melee_attack::calc_to_hit(bool random)