summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-18 16:55:28 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-18 16:55:28 +0200
commit509d3d3b62c2dc5b328cf122c0fc5f0595b73721 (patch)
treeba04358da23a8a519e3139f64058709bbc208b4e
parentSplit into more lines. (diff)
downloadcuberite-509d3d3b62c2dc5b328cf122c0fc5f0595b73721.tar
cuberite-509d3d3b62c2dc5b328cf122c0fc5f0595b73721.tar.gz
cuberite-509d3d3b62c2dc5b328cf122c0fc5f0595b73721.tar.bz2
cuberite-509d3d3b62c2dc5b328cf122c0fc5f0595b73721.tar.lz
cuberite-509d3d3b62c2dc5b328cf122c0fc5f0595b73721.tar.xz
cuberite-509d3d3b62c2dc5b328cf122c0fc5f0595b73721.tar.zst
cuberite-509d3d3b62c2dc5b328cf122c0fc5f0595b73721.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Monster.cpp2
-rw-r--r--src/Mobs/Slime.cpp4
-rw-r--r--src/Mobs/Slime.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index e36634c73..2a796e8eb 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -867,7 +867,7 @@ cMonster * cMonster::NewMonsterFromType(cMonster::eType a_MobType)
}
case mtSlime:
{
- toReturn = new cSlime(Random.NextInt(2) + 1);
+ toReturn = new cSlime(1 << Random.NextInt(3));
break;
}
case mtSkeleton:
diff --git a/src/Mobs/Slime.cpp b/src/Mobs/Slime.cpp
index 4e12fca51..4b123df12 100644
--- a/src/Mobs/Slime.cpp
+++ b/src/Mobs/Slime.cpp
@@ -9,7 +9,6 @@
-/// Creates a slime of the specified size; size is 1 .. 3, with 1 being the smallest
cSlime::cSlime(int a_Size) :
super("Slime",
mtSlime,
@@ -36,7 +35,8 @@ void cSlime::GetDrops(cItems & a_Drops, cEntity * a_Killer)
LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
}
- if (GetSize() == 1)
+ // Only slimes with the size 1 can drop slimeballs.
+ if (m_Size == 1)
{
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_SLIMEBALL);
}
diff --git a/src/Mobs/Slime.h b/src/Mobs/Slime.h
index 87c5a8e5e..b0e2f627c 100644
--- a/src/Mobs/Slime.h
+++ b/src/Mobs/Slime.h
@@ -13,7 +13,7 @@ class cSlime :
typedef cAggressiveMonster super;
public:
- /** Creates a slime of the specified size; size is 1 .. 3, with 1 being the smallest */
+ /** Creates a slime of the specified size; size can be 1, 2 or 4, with 1 is the smallest and 4 is the tallest. */
cSlime(int a_Size);
CLASS_PROTODEF(cSlime);