From d851c47acd718c4ae113d9826787a85b534f8985 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 12 May 2013 16:23:49 +0000 Subject: cWorld: Temporary fix for FS #338 The pickups get spawned with zero speed, not to mess up their physics simulation. Marked as temporary, remove when physics are completed. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1474 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/World.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source') 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), -- cgit v1.2.3