summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-04 10:27:50 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-04 10:27:50 +0200
commit9ef4b9d52d0b3b19eed90daf528bab5b9c01d8dc (patch)
treeee425b431809d2c01decedb9acf44f6559f55e82 /src
parentFixed mob loading, part of #1058 (diff)
downloadcuberite-9ef4b9d52d0b3b19eed90daf528bab5b9c01d8dc.tar
cuberite-9ef4b9d52d0b3b19eed90daf528bab5b9c01d8dc.tar.gz
cuberite-9ef4b9d52d0b3b19eed90daf528bab5b9c01d8dc.tar.bz2
cuberite-9ef4b9d52d0b3b19eed90daf528bab5b9c01d8dc.tar.lz
cuberite-9ef4b9d52d0b3b19eed90daf528bab5b9c01d8dc.tar.xz
cuberite-9ef4b9d52d0b3b19eed90daf528bab5b9c01d8dc.tar.zst
cuberite-9ef4b9d52d0b3b19eed90daf528bab5b9c01d8dc.zip
Diffstat (limited to 'src')
-rw-r--r--src/Mobs/Creeper.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Mobs/Creeper.cpp b/src/Mobs/Creeper.cpp
index 9cf539427..a7b97f604 100644
--- a/src/Mobs/Creeper.cpp
+++ b/src/Mobs/Creeper.cpp
@@ -43,7 +43,7 @@ void cCreeper::Tick(float a_Dt, cChunk & a_Chunk)
if (m_ExplodingTimer == 30)
{
m_World->DoExplosionAt((m_bIsCharged ? 5 : 3), GetPosX(), GetPosY(), GetPosZ(), false, esMonster, this);
- Destroy();
+ Destroy(); // Just in case we aren't killed by the explosion
}
}
}
@@ -54,6 +54,12 @@ void cCreeper::Tick(float a_Dt, cChunk & a_Chunk)
void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{
+ if (m_ExplodingTimer == 30)
+ {
+ // Exploded creepers drop naught but charred flesh, which Minecraft doesn't have
+ return;
+ }
+
int LootingLevel = 0;
if (a_Killer != NULL)
{
@@ -65,7 +71,7 @@ void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{
if (((cMonster *)((cProjectileEntity *)a_Killer)->GetCreator())->GetMobType() == mtSkeleton)
{
- // 12 music discs. TickRand starts from 0, so range = 11. Disk IDs start at 2256, so add that. There.
+ // 12 music discs. TickRand starts from 0 to 11. Disk IDs start at 2256, so add that. There.
AddRandomDropItem(a_Drops, 1, 1, (short)m_World->GetTickRandomNumber(11) + 2256);
}
}