From 1c4122313f07bd2b93eff318f8d2fbf582e7ea6b Mon Sep 17 00:00:00 2001 From: faketruth Date: Thu, 16 Feb 2012 13:23:54 +0000 Subject: Chunks are properly saved before being unloaded now numchunks server command works again git-svn-id: http://mc-server.googlecode.com/svn/trunk@272 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cChunkMap.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/cChunkMap.h') diff --git a/source/cChunkMap.h b/source/cChunkMap.h index bc7bddd96..b5d6abd60 100644 --- a/source/cChunkMap.h +++ b/source/cChunkMap.h @@ -84,7 +84,14 @@ private: int GetX(void) const {return m_LayerX; } int GetZ(void) const {return m_LayerZ; } - int GetNumChunksLoaded(void) const {return m_NumChunksLoaded; } + int GetNumChunksLoaded(void) const + { + int NumChunks = 0; + for( int i = 0; i < LAYER_SIZE*LAYER_SIZE; ++i ) + if( m_Chunks[i].get() ) + NumChunks++; + return NumChunks; + } void Save(void); void UnloadUnusedChunks(void); -- cgit v1.2.3