From 2928cb6853f1e007e98f174c37d75c793a0c09cc Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Thu, 16 Feb 2012 17:45:26 +0000 Subject: cWorldGenerator speedup - doesn't call GetChunk() anymore, not queueing the chunk it's generating to be loaded recursively. cChunk fix - setting a block to the same value doesn't mark chunk dirty (resulted in un-unloadable chunks) git-svn-id: http://mc-server.googlecode.com/svn/trunk@279 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorldGenerator.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/cWorldGenerator.h') diff --git a/source/cWorldGenerator.h b/source/cWorldGenerator.h index 933105d24..208178d4a 100644 --- a/source/cWorldGenerator.h +++ b/source/cWorldGenerator.h @@ -15,13 +15,16 @@ class cWorldGenerator { public: - cWorldGenerator(); + cWorldGenerator(cWorld * a_World); ~cWorldGenerator(); - virtual void GenerateChunk( cChunkPtr a_Chunk ); + virtual void GenerateChunk(int a_ChunkX, int a_ChunkY, int a_ChunkZ); protected: + cWorld * m_World; + + // Thread-unsafe: MTRand r1; virtual void GenerateTerrain( cChunkPtr a_Chunk ); -- cgit v1.2.3