summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monster.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-08 14:13:17 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-08 14:13:17 -0600
commite4ed21470a29b0f88424ee48a44d166666c36609 (patch)
tree5a16076cf8eb9506293ae15967cd0ffd3b472a5c /crawl-ref/source/monster.cc
parentf5c61bd43ba6fc429cc424c0ea9acfd426c77b2c (diff)
downloadcrawl-ref-e4ed21470a29b0f88424ee48a44d166666c36609.tar.gz
crawl-ref-e4ed21470a29b0f88424ee48a44d166666c36609.zip
When mutiplying/dividing by slime creatures' number, check if it's
greayer than 1, to avoid redundant operations.
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r--crawl-ref/source/monster.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index 85306480ab..511951499c 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -407,7 +407,7 @@ int monsters::body_weight() const
weight /= 2;
// Slime creature weight is multiplied by the number merged.
- if (type == MONS_SLIME_CREATURE)
+ if (type == MONS_SLIME_CREATURE && number > 1)
weight *= number;
return (weight);