From 2ca40c819ecb7b77879c62b2465345a5e6428bd5 Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Thu, 29 Dec 2011 02:44:21 +0000 Subject: - Pickups should now burn in fire - The player no longer gets an empty bucket when in creative mode - improved the simulators again (moved to std::list because this should be faster with so many objects) (But the water simulation still is very slow) git-svn-id: http://mc-server.googlecode.com/svn/trunk@153 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cSandSimulator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/cSandSimulator.cpp') diff --git a/source/cSandSimulator.cpp b/source/cSandSimulator.cpp index 65516178b..c27607f73 100644 --- a/source/cSandSimulator.cpp +++ b/source/cSandSimulator.cpp @@ -7,8 +7,8 @@ cSandSimulator::cSandSimulator( cWorld* a_World ) : cSimulator(a_World) - , m_Blocks(new std::vector ) - , m_Buffer(new std::vector ) + , m_Blocks(new std::list ) + , m_Buffer(new std::list ) { } @@ -24,7 +24,7 @@ void cSandSimulator::Simulate( float a_Dt ) m_Buffer->clear(); std::swap( m_Blocks, m_Buffer ); - for( std::vector::iterator itr = m_Buffer->begin(); itr != m_Buffer->end(); ++itr ) + for( std::list::iterator itr = m_Buffer->begin(); itr != m_Buffer->end(); ++itr ) { Vector3i *Pos = *itr; char BlockID = m_World->GetBlock(Pos->x, Pos->y, Pos->z); @@ -57,7 +57,7 @@ void cSandSimulator::AddBlock(int a_X, int a_Y, int a_Z) Vector3i *Block = new Vector3i(a_X, a_Y, a_Z); //check for duplicates - for( std::vector::iterator itr = m_Blocks->begin(); itr != m_Blocks->end(); ++itr ) + for( std::list::iterator itr = m_Blocks->begin(); itr != m_Blocks->end(); ++itr ) { Vector3i *Pos = *itr; if( Pos->x == a_X && Pos->y == a_Y && Pos->z == a_Z ) -- cgit v1.2.3