summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.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/monster.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/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc33
1 files changed, 1 insertions, 32 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 0781f1a4d3..459b9914d0 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -334,38 +334,7 @@ int monsters::body_weight() const
// is sucked. Grrrr.
if (weight == 0 && !mons_is_insubstantial(type))
{
- const monsterentry *entry = get_monster_data(mclass);
- switch (entry->size)
- {
- 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 monster body weight");
- perror("monsters::body_weight(): invalid monster body weight");
- end(0);
- }
+ weight = actor::body_weight();
switch (mclass)
{