summaryrefslogtreecommitdiffstats
path: root/source/World.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-12 18:23:49 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-05-12 18:23:49 +0200
commitd851c47acd718c4ae113d9826787a85b534f8985 (patch)
tree1eac668d5a2aa9ba7035b82fd95b6e2b8f39caf2 /source/World.cpp
parentDistortedHeightmap: Added info comment about the parameters table (diff)
downloadcuberite-d851c47acd718c4ae113d9826787a85b534f8985.tar
cuberite-d851c47acd718c4ae113d9826787a85b534f8985.tar.gz
cuberite-d851c47acd718c4ae113d9826787a85b534f8985.tar.bz2
cuberite-d851c47acd718c4ae113d9826787a85b534f8985.tar.lz
cuberite-d851c47acd718c4ae113d9826787a85b534f8985.tar.xz
cuberite-d851c47acd718c4ae113d9826787a85b534f8985.tar.zst
cuberite-d851c47acd718c4ae113d9826787a85b534f8985.zip
Diffstat (limited to '')
-rw-r--r--source/World.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/World.cpp b/source/World.cpp
index b10f68554..0c33ddcaf 100644
--- a/source/World.cpp
+++ b/source/World.cpp
@@ -1208,6 +1208,11 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
float SpeedX = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500));
float SpeedY = (float)(a_FlyAwaySpeed * r1.randInt(1000));
float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500));
+
+ // TODO 2013_05_12 _X: Because spawning pickups with nonzero speed causes them to bug (FS #338),
+ // I decided to temporarily reset the speed to zero to fix it, until we have proper pickup physics
+ SpeedX = SpeedY = SpeedZ = 0;
+
cPickup * Pickup = new cPickup(
(int)(a_BlockX * 32) + (r1.randInt(16) + r1.randInt(16) - 16),
(int)(a_BlockY * 32) + (r1.randInt(16) + r1.randInt(16) - 16),
@@ -1227,6 +1232,10 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
MTRand r1;
for (cItems::const_iterator itr = a_Pickups.begin(); itr != a_Pickups.end(); ++itr)
{
+ // TODO 2013_05_12 _X: Because spawning pickups with nonzero speed causes them to bug (FS #338),
+ // I decided to temporarily reset the speed to zero to fix it, until we have proper pickup physics
+ a_SpeedX = a_SpeedY = a_SpeedZ = 0;
+
cPickup * Pickup = new cPickup(
(int)(a_BlockX * 32) + r1.randInt(16) + r1.randInt(16),
(int)(a_BlockY * 32) + r1.randInt(16) + r1.randInt(16),