From 9cd633348697862121a916d0b1f894fbf5ad457c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 28 May 2013 12:18:03 +0000 Subject: cChunk: Added the GetRelNeighborChunkAdjustCoords() function Not only does it return the proper neighbor chunk, but also it adjusts the relative coords to be in that returned chunk. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1523 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Chunk.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/Chunk.h') diff --git a/source/Chunk.h b/source/Chunk.h index 506d0cd0f..a1a6bc1d7 100644 --- a/source/Chunk.h +++ b/source/Chunk.h @@ -159,6 +159,13 @@ public: */ cChunk * GetRelNeighborChunk(int a_RelX, int a_RelZ); + /** + Returns the chunk into which the relatively-specified block belongs, by walking the neighbors. + Also modifies the relative coords from this-relative to return-relative. + Will return self if appropriate. Returns NULL if not reachable through neighbors. + */ + cChunk * GetRelNeighborChunkAdjustCoords(int & a_RelX, int & a_RelZ); + EMCSBiome GetBiomeAt(int a_RelX, int a_RelZ) const {return cChunkDef::GetBiome(m_BiomeMap, a_RelX, a_RelZ); } void CollectPickupsByPlayer(cPlayer * a_Player); -- cgit v1.2.3