summaryrefslogtreecommitdiffstats
path: root/source/cSandSimulator.cpp
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-29 03:44:21 +0100
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-29 03:44:21 +0100
commit2ca40c819ecb7b77879c62b2465345a5e6428bd5 (patch)
treea5be4ab8ed7ecac9b6b222c0dd330e8c0bb6c3db /source/cSandSimulator.cpp
parent- water slacks fire now (diff)
downloadcuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.gz
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.bz2
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.lz
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.xz
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.tar.zst
cuberite-2ca40c819ecb7b77879c62b2465345a5e6428bd5.zip
Diffstat (limited to '')
-rw-r--r--source/cSandSimulator.cpp8
1 files changed, 4 insertions, 4 deletions
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 <Vector3i *>)
- , m_Buffer(new std::vector <Vector3i *>)
+ , m_Blocks(new std::list <Vector3i *>)
+ , m_Buffer(new std::list <Vector3i *>)
{
}
@@ -24,7 +24,7 @@ void cSandSimulator::Simulate( float a_Dt )
m_Buffer->clear();
std::swap( m_Blocks, m_Buffer );
- for( std::vector<Vector3i *>::iterator itr = m_Buffer->begin(); itr != m_Buffer->end(); ++itr )
+ for( std::list<Vector3i *>::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<Vector3i *>::iterator itr = m_Blocks->begin(); itr != m_Blocks->end(); ++itr )
+ for( std::list<Vector3i *>::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 )