summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-26 10:09:47 +0100
committermtilden@gmail.com <mtilden@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-12-26 10:09:47 +0100
commitc7fa610be3b6e072d3da4611f6de72390ebbf446 (patch)
treeeaa1e1d08d9136c78228ec067f4d41b1d33ef320 /source/cChunk.cpp
parent - Added timer to cPlayer PlayerListItem because sending the packets like minecraft does (every tick per player) is 20 pps per client to each client and was causing Kicks for having too high of a packet queue (diff)
downloadcuberite-c7fa610be3b6e072d3da4611f6de72390ebbf446.tar
cuberite-c7fa610be3b6e072d3da4611f6de72390ebbf446.tar.gz
cuberite-c7fa610be3b6e072d3da4611f6de72390ebbf446.tar.bz2
cuberite-c7fa610be3b6e072d3da4611f6de72390ebbf446.tar.lz
cuberite-c7fa610be3b6e072d3da4611f6de72390ebbf446.tar.xz
cuberite-c7fa610be3b6e072d3da4611f6de72390ebbf446.tar.zst
cuberite-c7fa610be3b6e072d3da4611f6de72390ebbf446.zip
Diffstat (limited to '')
-rw-r--r--source/cChunk.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 30f6d839f..4eeb5c5b8 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -30,6 +30,7 @@
#include "cCriticalSection.h"
#include "cWorldGenerator.h"
#include "cBlockToPickup.h"
+#include "MersenneTwister.h"
#include "packets/cPacket_DestroyEntity.h"
#include "packets/cPacket_PreChunk.h"
@@ -333,11 +334,11 @@ void cChunk::Tick(float a_Dt)
break;
};
}
-
+ MTRand r1;
// Tick dem blocks
- int RandomX = rand();
- int RandomY = rand();
- int RandomZ = rand();
+ int RandomX = r1.randInt();
+ int RandomY = r1.randInt();
+ int RandomZ = r1.randInt();
for(int i = 0; i < 50; i++)
{