summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-08 13:36:54 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-08 13:36:54 +0100
commit32880153ab76830311d8a1db3a157cd5ac6e5d9c (patch)
treec7c77a8c5b6bf86f3f18655e8ec976c30a5c8c15 /source/cChunk.cpp
parentcSocketThreads plugged in for cClientHandle reading. Sending still kept the old way. Please help me test this commit thoroughly, this is a change that can break on subtleties. (diff)
downloadcuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.gz
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.bz2
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.lz
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.xz
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.tar.zst
cuberite-32880153ab76830311d8a1db3a157cd5ac6e5d9c.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index edd39a378..6bf5172ae 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -190,7 +190,7 @@ void cChunk::Initialize()
-void cChunk::Tick(float a_Dt)
+void cChunk::Tick(float a_Dt, MTRand & a_TickRandom)
{
if (m_bCalculateLighting)
{
@@ -356,11 +356,10 @@ void cChunk::Tick(float a_Dt)
};
}
- MTRand r1;
// Tick dem blocks
- int RandomX = r1.randInt();
- int RandomY = r1.randInt();
- int RandomZ = r1.randInt();
+ int RandomX = a_TickRandom.randInt();
+ int RandomY = a_TickRandom.randInt();
+ int RandomZ = a_TickRandom.randInt();
for(int i = 0; i < 50; i++)
{
@@ -426,6 +425,10 @@ void cChunk::Tick(float a_Dt)
}
}
+
+
+
+
char cChunk::GetHeight( int a_X, int a_Z )
{
if( a_X >= 0 && a_X < 16 && a_Z >= 0 && a_Z < 16 )