From 6744738a85c60238585dcf72af211f852fd7e4c6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 2 Mar 2013 19:57:09 +0000 Subject: Rewritten SandSimulator to use direct chunk access; and sand falling on torches now creates a pickup. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1240 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/World.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/World.cpp') diff --git a/source/World.cpp b/source/World.cpp index 84874258f..2cfe56d57 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -250,10 +250,10 @@ cWorld::cWorld(const AString & a_WorldName) : m_BlockTickQueueCopy.reserve(1000); // Simulators: - m_SimulatorManager = new cSimulatorManager(*this); + m_SimulatorManager = new cSimulatorManager(*this); m_WaterSimulator = InitializeFluidSimulator(IniFile, "Water", E_BLOCK_WATER, E_BLOCK_STATIONARY_WATER); m_LavaSimulator = InitializeFluidSimulator(IniFile, "Lava", E_BLOCK_LAVA, E_BLOCK_STATIONARY_LAVA); - m_SandSimulator = new cSandSimulator(*this); + m_SandSimulator = new cSandSimulator(*this, IniFile); m_FireSimulator = new cFireSimulator(*this, IniFile); m_RedstoneSimulator = new cRedstoneSimulator(*this); @@ -1166,9 +1166,9 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double float SpeedY = (float)(a_FlyAwaySpeed * r1.randInt(1000)); float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(1000) - 500)); cPickup * Pickup = new cPickup( - (int)(a_BlockX * 32) + r1.randInt(16) + r1.randInt(16), - (int)(a_BlockY * 32) + r1.randInt(16) + r1.randInt(16), - (int)(a_BlockZ * 32) + r1.randInt(16) + r1.randInt(16), + (int)(a_BlockX * 32) + (r1.randInt(16) + r1.randInt(16) - 16), + (int)(a_BlockY * 32) + (r1.randInt(16) + r1.randInt(16) - 16), + (int)(a_BlockZ * 32) + (r1.randInt(16) + r1.randInt(16) - 16), *itr, SpeedX, SpeedY, SpeedZ ); Pickup->Initialize(this); -- cgit v1.2.3