summaryrefslogtreecommitdiffstats
path: root/source/World.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-18 23:20:08 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-18 23:20:08 +0200
commit198ac1892ca0751551206ca25164bc691386914b (patch)
treed69d08c269a7eaf78dd8917e309f0d75d4accf3d /source/World.cpp
parentAdded moar mobs! (diff)
downloadcuberite-198ac1892ca0751551206ca25164bc691386914b.tar
cuberite-198ac1892ca0751551206ca25164bc691386914b.tar.gz
cuberite-198ac1892ca0751551206ca25164bc691386914b.tar.bz2
cuberite-198ac1892ca0751551206ca25164bc691386914b.tar.lz
cuberite-198ac1892ca0751551206ca25164bc691386914b.tar.xz
cuberite-198ac1892ca0751551206ca25164bc691386914b.tar.zst
cuberite-198ac1892ca0751551206ca25164bc691386914b.zip
Diffstat (limited to 'source/World.cpp')
-rw-r--r--source/World.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/source/World.cpp b/source/World.cpp
index 6ec3825cf..606ef0787 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -1522,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);
@@ -1542,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);