summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-13 22:11:29 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-13 22:15:54 +0100
commit0b2938bbfc318cb3dd6ecf123ae5bb77cd24cf72 (patch)
treee66b96c1b09e1064c72ec39f68ee765f1facac0d /crawl-ref/source/player.cc
parent13ac52b42d87cf36953ae807b88c49c62a491211 (diff)
downloadcrawl-ref-0b2938bbfc318cb3dd6ecf123ae5bb77cd24cf72.tar.gz
crawl-ref-0b2938bbfc318cb3dd6ecf123ae5bb77cd24cf72.zip
Put duplicated body weight calculations into actor::.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc33
1 files changed, 1 insertions, 32 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 39b9f2242d..1deed6be73 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5590,38 +5590,7 @@ size_type player::body_size(size_part_type psize, bool base) const
int player::body_weight() const
{
- int weight = 0;
- switch (body_size(PSIZE_BODY))
- {
- case SIZE_TINY:
- weight = 150;
- break;
- case SIZE_LITTLE:
- weight = 300;
- break;
- case SIZE_SMALL:
- weight = 425;
- break;
- case SIZE_MEDIUM:
- weight = 550;
- break;
- case SIZE_LARGE:
- weight = 1300;
- break;
- case SIZE_BIG:
- weight = 1500;
- break;
- case SIZE_GIANT:
- weight = 1800;
- break;
- case SIZE_HUGE:
- weight = 2200;
- break;
- default:
- mpr("ERROR: invalid player body weight");
- perror("player::body_weight(): invalid player body weight");
- end(0);
- }
+ int weight = actor::body_weight();
switch (attribute[ATTR_TRANSFORMATION])
{