diff options
author | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-28 22:35:43 +0100 |
---|---|---|
committer | lapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-12-28 22:35:43 +0100 |
commit | c5fab7e7c8da1bb69c3a9b6506256193564fd13b (patch) | |
tree | 0624cc7df1203d34897acad363cf9e9f19cd1f3a /source | |
parent | - implemented the fire simulation in native c++ (cFireSimulator) (diff) | |
download | cuberite-c5fab7e7c8da1bb69c3a9b6506256193564fd13b.tar cuberite-c5fab7e7c8da1bb69c3a9b6506256193564fd13b.tar.gz cuberite-c5fab7e7c8da1bb69c3a9b6506256193564fd13b.tar.bz2 cuberite-c5fab7e7c8da1bb69c3a9b6506256193564fd13b.tar.lz cuberite-c5fab7e7c8da1bb69c3a9b6506256193564fd13b.tar.xz cuberite-c5fab7e7c8da1bb69c3a9b6506256193564fd13b.tar.zst cuberite-c5fab7e7c8da1bb69c3a9b6506256193564fd13b.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cSandSimulator.cpp | 9 | ||||
-rw-r--r-- | source/cSandSimulator.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/source/cSandSimulator.cpp b/source/cSandSimulator.cpp index 77f206b52..65516178b 100644 --- a/source/cSandSimulator.cpp +++ b/source/cSandSimulator.cpp @@ -74,4 +74,11 @@ bool cSandSimulator::IsPassable( char a_BlockID ) || IsBlockWater(a_BlockID)
|| IsBlockLava(a_BlockID);
-}
\ No newline at end of file +}
+
+void cSandSimulator::WakeUp( int a_X, int a_Y, int a_Z )
+{
+ //Nothing else needs to be simulated :D (Bugs not included :s)
+ AddBlock( a_X, a_Y+1, a_Z );
+ AddBlock( a_X, a_Y, a_Z );
+}
diff --git a/source/cSandSimulator.h b/source/cSandSimulator.h index 84bba935f..a3809850d 100644 --- a/source/cSandSimulator.h +++ b/source/cSandSimulator.h @@ -12,6 +12,7 @@ public: ~cSandSimulator();
virtual void Simulate( float a_Dt );
+ virtual inline void WakeUp( int a_X, int a_Y, int a_Z );
virtual inline bool IsAllowedBlock( char a_BlockID );
virtual inline bool IsPassable( char a_BlockID );
|