From c7fa610be3b6e072d3da4611f6de72390ebbf446 Mon Sep 17 00:00:00 2001 From: "mtilden@gmail.com" Date: Mon, 26 Dec 2011 09:09:47 +0000 Subject: - Linux compatible fixes including updated makefile - Mersenne Twister still says uint32 but it's now signed for compatibility with random uses needing negative values - Server seed is sent to clients, but needs to be able to be signed long long later on for authentic reasons - Protocol Version is required to match to ensure client compatibility, this should probably have a settings.ini check as well as store the value there git-svn-id: http://mc-server.googlecode.com/svn/trunk@121 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunk.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/cChunk.cpp') 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++) { -- cgit v1.2.3