From 0b2938bbfc318cb3dd6ecf123ae5bb77cd24cf72 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Fri, 13 Nov 2009 22:11:29 +0100 Subject: Put duplicated body weight calculations into actor::. --- crawl-ref/source/player.cc | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'crawl-ref/source/player.cc') 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]) { -- cgit v1.2.3-54-g00ecf