diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Blocks/BlockHandler.cpp | 5 | ||||
-rw-r--r-- | src/World.cpp | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 99559ed02..fde6bd803 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -376,9 +376,8 @@ void cBlockHandler::DropBlock(cWorld * a_World, cEntity * a_Digger, int a_BlockX MicroZ = a_BlockZ + 0.5; // Add random offset second (this causes pickups to spawn inside blocks most times, it's a little buggy) - //MicroX += (int)(r1.randInt(16) + r1.randInt(16) - 16); - //MicroY += (int)(r1.randInt(16) + r1.randInt(16) - 16); - //MicroZ += (int)(r1.randInt(16) + r1.randInt(16) - 16); + MicroX += r1.rand(1) - 0.5; + MicroZ += r1.rand(1) - 0.5; a_World->SpawnItemPickups(Pickups, MicroX, MicroY, MicroZ); } diff --git a/src/World.cpp b/src/World.cpp index eecd02027..564905d33 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -1588,7 +1588,7 @@ bool cWorld::WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlock void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_FlyAwaySpeed, bool IsPlayerCreated) { MTRand r1; - a_FlyAwaySpeed /= 1000; // Pre-divide, so that we don't have to divide each time inside the loop + a_FlyAwaySpeed /= 100; // Pre-divide, so that we don't have to divide each time inside the loop for (cItems::const_iterator itr = a_Pickups.begin(); itr != a_Pickups.end(); ++itr) { if (!IsValidItem(itr->m_ItemType)) @@ -1597,9 +1597,9 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double continue; } - float SpeedX = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500)); - float SpeedY = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500)); - float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500)); + float SpeedX = (float)(a_FlyAwaySpeed * (r1.randInt(10) - 5)); + float SpeedY = (float)(a_FlyAwaySpeed * r1.randInt(50)); + float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(10) - 5)); cPickup * Pickup = new cPickup( a_BlockX, a_BlockY, a_BlockZ, |