summaryrefslogtreecommitdiffstats
path: root/source/cFluidSimulator.cpp
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-26 21:57:12 +0100
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-26 21:57:12 +0100
commit9f77572fb0d045229556314ba9d7aa0f52ad5635 (patch)
tree67bf3cfaf013be8566e0d541c1a1b571719816f7 /source/cFluidSimulator.cpp
parent- improved ClosestPlayerDetection (Really the closest now ;)) (diff)
downloadcuberite-9f77572fb0d045229556314ba9d7aa0f52ad5635.tar
cuberite-9f77572fb0d045229556314ba9d7aa0f52ad5635.tar.gz
cuberite-9f77572fb0d045229556314ba9d7aa0f52ad5635.tar.bz2
cuberite-9f77572fb0d045229556314ba9d7aa0f52ad5635.tar.lz
cuberite-9f77572fb0d045229556314ba9d7aa0f52ad5635.tar.xz
cuberite-9f77572fb0d045229556314ba9d7aa0f52ad5635.tar.zst
cuberite-9f77572fb0d045229556314ba9d7aa0f52ad5635.zip
Diffstat (limited to 'source/cFluidSimulator.cpp')
-rw-r--r--source/cFluidSimulator.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/source/cFluidSimulator.cpp b/source/cFluidSimulator.cpp
index 6eb5dbb0a..2ede7ba49 100644
--- a/source/cFluidSimulator.cpp
+++ b/source/cFluidSimulator.cpp
@@ -72,7 +72,7 @@ public:
};
cFluidSimulator::cFluidSimulator( cWorld* a_World )
- : m_World(a_World)
+ : cSimulator(a_World)
, m_Data(0)
{
m_Data = new FluidData(a_World, this);
@@ -80,17 +80,7 @@ cFluidSimulator::cFluidSimulator( cWorld* a_World )
cFluidSimulator::~cFluidSimulator()
{
-}
-
-void cFluidSimulator::WakeUp( int a_X, int a_Y, int a_Z )
-{
- AddBlock( a_X, a_Y, a_Z );
- AddBlock( a_X-1, a_Y, a_Z );
- AddBlock( a_X+1, a_Y, a_Z );
- AddBlock( a_X, a_Y-1, a_Z );
- AddBlock( a_X, a_Y+1, a_Z );
- AddBlock( a_X, a_Y, a_Z-1 );
- AddBlock( a_X, a_Y, a_Z+1 );
+ delete m_Data;
}
void cFluidSimulator::AddBlock( int a_X, int a_Y, int a_Z )
@@ -99,8 +89,8 @@ void cFluidSimulator::AddBlock( int a_X, int a_Y, int a_Z )
std::vector< Vector3i > & ActiveFluid = *m_Data->m_ActiveFluid;
for( std::vector< Vector3i >::iterator itr = ActiveFluid.begin(); itr != ActiveFluid.end(); ++itr )
{
- Vector3i & pos = *itr;
- if( pos.x == a_X && pos.y == a_Y && pos.z == a_Z )
+ Vector3i & Pos = *itr;
+ if( Pos.x == a_X && Pos.y == a_Y && Pos.z == a_Z )
return;
}