summaryrefslogtreecommitdiffstats
path: root/source/World.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-01 12:39:56 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-01 12:39:56 +0200
commit37276a4430e26f5b3ab56e07d5f30a194f75982e (patch)
tree95ba9a0a151dc9f4111d8b99e8af728993daa783 /source/World.cpp
parentChanged the crafting recipe for book to match vanilla since 1.3.1 (fix contributed by mgueydan) (diff)
downloadcuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.gz
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.bz2
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.lz
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.xz
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.tar.zst
cuberite-37276a4430e26f5b3ab56e07d5f30a194f75982e.zip
Diffstat (limited to 'source/World.cpp')
-rw-r--r--source/World.cpp52
1 files changed, 27 insertions, 25 deletions
diff --git a/source/World.cpp b/source/World.cpp
index 569e2e4f9..4333aa7a4 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -1523,9 +1523,9 @@ void cWorld::BroadcastEntityStatus(const cEntity & a_Entity, char a_Status, cons
-void cWorld::BroadcastMetadata(const cPawn & a_Pawn, const cClientHandle * a_Exclude)
+void cWorld::BroadcastMetadata(const cEntity & a_Entity, const cClientHandle * a_Exclude)
{
- m_ChunkMap->BroadcastMetadata(a_Pawn, a_Exclude);
+ m_ChunkMap->BroadcastMetadata(a_Entity, a_Exclude);
}
@@ -2317,31 +2317,33 @@ int cWorld::SpawnMob(double a_PosX, double a_PosY, double a_PosZ, int a_EntityTy
{
cMonster * Monster = NULL;
+ int Size = GetTickRandomNumber(2) + 1; // 1 .. 3
+
switch (a_EntityType)
{
- case E_ENTITY_TYPE_BAT: Monster = new cBat(); break;
- case E_ENTITY_TYPE_BLAZE: Monster = new cBlaze(); break;
- case E_ENTITY_TYPE_CAVE_SPIDER: Monster = new cCavespider(); break;
- case E_ENTITY_TYPE_CHICKEN: Monster = new cChicken(); break;
- case E_ENTITY_TYPE_COW: Monster = new cCow(); break;
- case E_ENTITY_TYPE_CREEPER: Monster = new cCreeper(); break;
- case E_ENTITY_TYPE_ENDERMAN: Monster = new cEnderman(); break;
- case E_ENTITY_TYPE_GHAST: Monster = new cGhast(); break;
- case E_ENTITY_TYPE_MAGMA_CUBE: Monster = new cMagmacube(); break;
- case E_ENTITY_TYPE_MOOSHROOM: Monster = new cMooshroom(); break;
- case E_ENTITY_TYPE_OCELOT: Monster = new cOcelot(); break;
- case E_ENTITY_TYPE_PIG: Monster = new cPig(); break;
- case E_ENTITY_TYPE_SHEEP: Monster = new cSheep(); break;
- case E_ENTITY_TYPE_SILVERFISH: Monster = new cSilverfish(); break;
- case E_ENTITY_TYPE_SKELETON: Monster = new cSkeleton(); break;
- case E_ENTITY_TYPE_SLIME: Monster = new cSlime(); break;
- case E_ENTITY_TYPE_SPIDER: Monster = new cSpider(); break;
- case E_ENTITY_TYPE_SQUID: Monster = new cSquid(); break;
- case E_ENTITY_TYPE_VILLAGER: Monster = new cVillager(); break;
- case E_ENTITY_TYPE_WITCH: Monster = new cWitch(); break;
- case E_ENTITY_TYPE_WOLF: Monster = new cWolf(); break;
- case E_ENTITY_TYPE_ZOMBIE: Monster = new cZombie(); break;
- case E_ENTITY_TYPE_ZOMBIE_PIGMAN: Monster = new cZombiepigman(); break;
+ case E_ENTITY_TYPE_BAT: Monster = new cBat(); break;
+ case E_ENTITY_TYPE_BLAZE: Monster = new cBlaze(); break;
+ case E_ENTITY_TYPE_CAVE_SPIDER: Monster = new cCavespider(); break;
+ case E_ENTITY_TYPE_CHICKEN: Monster = new cChicken(); break;
+ case E_ENTITY_TYPE_COW: Monster = new cCow(); break;
+ case E_ENTITY_TYPE_CREEPER: Monster = new cCreeper(); break;
+ case E_ENTITY_TYPE_ENDERMAN: Monster = new cEnderman(); break;
+ case E_ENTITY_TYPE_GHAST: Monster = new cGhast(); break;
+ case E_ENTITY_TYPE_MAGMA_CUBE: Monster = new cMagmacube(Size); break;
+ case E_ENTITY_TYPE_MOOSHROOM: Monster = new cMooshroom(); break;
+ case E_ENTITY_TYPE_OCELOT: Monster = new cOcelot(); break;
+ case E_ENTITY_TYPE_PIG: Monster = new cPig(); break;
+ case E_ENTITY_TYPE_SHEEP: Monster = new cSheep(); break;
+ case E_ENTITY_TYPE_SILVERFISH: Monster = new cSilverfish(); break;
+ case E_ENTITY_TYPE_SKELETON: Monster = new cSkeleton(); break;
+ case E_ENTITY_TYPE_SLIME: Monster = new cSlime(Size); break;
+ case E_ENTITY_TYPE_SPIDER: Monster = new cSpider(); break;
+ case E_ENTITY_TYPE_SQUID: Monster = new cSquid(); break;
+ case E_ENTITY_TYPE_VILLAGER: Monster = new cVillager(); break;
+ case E_ENTITY_TYPE_WITCH: Monster = new cWitch(); break;
+ case E_ENTITY_TYPE_WOLF: Monster = new cWolf(); break;
+ case E_ENTITY_TYPE_ZOMBIE: Monster = new cZombie(); break;
+ case E_ENTITY_TYPE_ZOMBIE_PIGMAN: Monster = new cZombiepigman(); break;
default:
{