From 50a7722242197f9a3b4300e154c1e66d1177839a Mon Sep 17 00:00:00 2001 From: faketruth Date: Thu, 19 Jan 2012 18:12:39 +0000 Subject: Terrain generation is synchronous again, async generation has bugs. Made some funky smart pointer things for chunks. Fixed a bug where the client would override the player position on the server and back again, resulting in sending too many chunks to the client which it doesn't even need. Fixed some compiler warnings in cPickup.cpp git-svn-id: http://mc-server.googlecode.com/svn/trunk@164 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorld.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source/cWorld.h') diff --git a/source/cWorld.h b/source/cWorld.h index ab99c11b1..38b7ec349 100644 --- a/source/cWorld.h +++ b/source/cWorld.h @@ -13,6 +13,7 @@ enum ENUM_ITEM_ID; #include #include "cSimulatorManager.h" +#include "ptr_cChunk.h" class cPacket; class cRedstone; @@ -36,7 +37,7 @@ class cWorld //tolua_export public: typedef std::list< cClientHandle* > ClientList; typedef std::list< cEntity* > EntityList; - typedef std::list< cChunk* > ChunkList; + typedef std::list< ptr_cChunk > ChunkList; typedef std::list< cPlayer* > PlayerList; std::vector m_RSList; @@ -56,7 +57,7 @@ public: cChunk* GetChunk( int a_X, int a_Y, int a_Z ); cChunk* GetChunkReliable( int a_X, int a_Y, int a_Z ); - cChunk* GetChunkUnreliable( int a_X, int a_Y, int a_Z ); + ptr_cChunk GetChunkUnreliable( int a_X, int a_Y, int a_Z ); cChunk* GetChunkOfBlock( int a_X, int a_Y, int a_Z ); char GetHeight( int a_X, int a_Z ); //tolua_export @@ -148,14 +149,14 @@ public: void LockChunks(); void UnlockChunks(); - void ReSpreadLighting( cChunk* a_Chunk ); - void RemoveSpread( cChunk* a_Chunk ); + void ReSpreadLighting( const ptr_cChunk& a_Chunk ); + void RemoveSpread( const ptr_cChunk& a_Chunk ); void InitializeSpawn(); - void CastThunderbolt ( int, int, int ); //tolua_export + void CastThunderbolt ( int, int, int ); //tolua_export void SetWeather ( int ); //tolua_export - int GetWeather() { return m_Weather; }; //tolua_export + int GetWeather() { return m_Weather; }; //tolua_export cWorldGenerator* GetWorldGenerator() { return m_WorldGenerator; } private: -- cgit v1.2.3