summaryrefslogtreecommitdiffstats
path: root/source/World.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/World.cpp')
-rw-r--r--source/World.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/source/World.cpp b/source/World.cpp
index 7be83168c..96a4731d7 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -35,7 +35,11 @@
#include "Mobs/Cow.h"
#include "Mobs/Creeper.h"
#include "Mobs/Enderman.h"
+#include "Mobs/EnderDragon.h"
#include "Mobs/Ghast.h"
+#include "Mobs/Giant.h"
+#include "Mobs/Horse.h"
+#include "Mobs/IronGolem.h"
#include "Mobs/Magmacube.h"
#include "Mobs/Mooshroom.h"
#include "Mobs/Ocelot.h"
@@ -44,10 +48,12 @@
#include "Mobs/Silverfish.h"
#include "Mobs/Skeleton.h"
#include "Mobs/Slime.h"
+#include "Mobs/SnowGolem.h"
#include "Mobs/Spider.h"
#include "Mobs/Squid.h"
#include "Mobs/Villager.h"
#include "Mobs/Witch.h"
+#include "Mobs/Wither.h"
#include "Mobs/Wolf.h"
#include "Mobs/Zombie.h"
#include "Mobs/Zombiepigman.h"
@@ -1516,14 +1522,9 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
float SpeedX = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500));
float SpeedY = 1;
float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500));
-
- // Pickup doesn't spawn on client without a mid block position. Perhaps the doubles are causing issues?
- int MicroX = (int)(floor(a_BlockX) * 32) + 16;
- int MicroY = (int)(floor(a_BlockY) * 32) + 16;
- int MicroZ = (int)(floor(a_BlockZ) * 32) + 16;
cPickup * Pickup = new cPickup(
- MicroX, MicroY, MicroZ,
+ a_BlockX, a_BlockY, a_BlockZ,
*itr, SpeedX, SpeedY, SpeedZ
);
Pickup->Initialize(this);
@@ -1536,16 +1537,10 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_SpeedX, double a_SpeedY, double a_SpeedZ)
{
- MTRand r1;
for (cItems::const_iterator itr = a_Pickups.begin(); itr != a_Pickups.end(); ++itr)
{
- // Pickup doesn't spawn on client without a mid block position. Perhaps the doubles are causing issues?
- int MicroX = (int)(floor(a_BlockX) * 32) + 16;
- int MicroY = (int)(floor(a_BlockY) * 32) + 16;
- int MicroZ = (int)(floor(a_BlockZ) * 32) + 16;
-
cPickup * Pickup = new cPickup(
- MicroX, MicroY, MicroZ,
+ a_BlockX, a_BlockY, a_BlockZ,
*itr, (float)a_SpeedX, (float)a_SpeedY, (float)a_SpeedZ
);
Pickup->Initialize(this);
@@ -2588,8 +2583,12 @@ int cWorld::SpawnMob(double a_PosX, double a_PosY, double a_PosZ, cMonster::eTyp
case cMonster::mtCow: Monster = new cCow(); break;
case cMonster::mtCreeper: Monster = new cCreeper(); break;
case cMonster::mtEnderman: Monster = new cEnderman(); break;
+ case cMonster::mtEnderDragon: Monster = new cEnderDragon(); break;
case cMonster::mtGhast: Monster = new cGhast(); break;
- case cMonster::mtMagmaCube: Monster = new cMagmacube(Size); break;
+ case cMonster::mtGiant: Monster = new cGiant(); break;
+ case cMonster::mtHorse: Monster = new cHorse(); break;
+ case cMonster::mtIronGolem: Monster = new cIronGolem(); break;
+ case cMonster::mtMagmaCube: Monster = new cMagmaCube(Size); break;
case cMonster::mtMooshroom: Monster = new cMooshroom(); break;
case cMonster::mtOcelot: Monster = new cOcelot(); break;
case cMonster::mtPig: Monster = new cPig(); break;
@@ -2597,13 +2596,15 @@ int cWorld::SpawnMob(double a_PosX, double a_PosY, double a_PosZ, cMonster::eTyp
case cMonster::mtSilverfish: Monster = new cSilverfish(); break;
case cMonster::mtSkeleton: Monster = new cSkeleton(); break;
case cMonster::mtSlime: Monster = new cSlime(Size); break;
+ case cMonster::mtSnowGolem: Monster = new cSnowGolem(); break;
case cMonster::mtSpider: Monster = new cSpider(); break;
case cMonster::mtSquid: Monster = new cSquid(); break;
case cMonster::mtVillager: Monster = new cVillager(); break;
case cMonster::mtWitch: Monster = new cWitch(); break;
+ case cMonster::mtWither: Monster = new cWither(); break;
case cMonster::mtWolf: Monster = new cWolf(); break;
case cMonster::mtZombie: Monster = new cZombie(); break;
- case cMonster::mtZombiePigman: Monster = new cZombiepigman(); break;
+ case cMonster::mtZombiePigman: Monster = new cZombiePigman(); break;
default:
{