summaryrefslogtreecommitdiffstats
path: root/src/Simulator/Simulator.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-27 22:35:13 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-27 22:35:13 +0100
commita6630d32394120a78af56bc612fa3c3449283248 (patch)
tree2c791266b0f213cd56961299da8d2258b8f85d8e /src/Simulator/Simulator.cpp
parentFixed spawn point being generally in an ocean (diff)
parentVoronoi-related biomegens use the new cVoronoiMap class. (diff)
downloadcuberite-a6630d32394120a78af56bc612fa3c3449283248.tar
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.gz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.bz2
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.lz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.xz
cuberite-a6630d32394120a78af56bc612fa3c3449283248.tar.zst
cuberite-a6630d32394120a78af56bc612fa3c3449283248.zip
Diffstat (limited to 'src/Simulator/Simulator.cpp')
-rw-r--r--src/Simulator/Simulator.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/Simulator/Simulator.cpp b/src/Simulator/Simulator.cpp
new file mode 100644
index 000000000..06fd0f858
--- /dev/null
+++ b/src/Simulator/Simulator.cpp
@@ -0,0 +1,51 @@
+
+#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
+
+#include "Simulator.h"
+#include "../World.h"
+#include "../Vector3i.h"
+#include "../BlockID.h"
+#include "../Defines.h"
+#include "../Chunk.h"
+
+
+
+
+
+cSimulator::cSimulator(cWorld & a_World)
+ : m_World(a_World)
+{
+}
+
+
+
+
+
+cSimulator::~cSimulator()
+{
+}
+
+
+
+
+
+void cSimulator::WakeUp(int a_BlockX, int a_BlockY, int a_BlockZ, cChunk * a_Chunk)
+{
+ AddBlock(a_BlockX, a_BlockY, a_BlockZ, a_Chunk);
+ AddBlock(a_BlockX - 1, a_BlockY, a_BlockZ, a_Chunk->GetNeighborChunk(a_BlockX - 1, a_BlockZ));
+ AddBlock(a_BlockX + 1, a_BlockY, a_BlockZ, a_Chunk->GetNeighborChunk(a_BlockX + 1, a_BlockZ));
+ AddBlock(a_BlockX, a_BlockY, a_BlockZ - 1, a_Chunk->GetNeighborChunk(a_BlockX, a_BlockZ - 1));
+ AddBlock(a_BlockX, a_BlockY, a_BlockZ + 1, a_Chunk->GetNeighborChunk(a_BlockX, a_BlockZ + 1));
+ if (a_BlockY > 0)
+ {
+ AddBlock(a_BlockX, a_BlockY - 1, a_BlockZ, a_Chunk);
+ }
+ if (a_BlockY < cChunkDef::Height - 1)
+ {
+ AddBlock(a_BlockX, a_BlockY + 1, a_BlockZ, a_Chunk);
+ }
+}
+
+
+
+