summaryrefslogtreecommitdiffstats
path: root/src/Chunk.h
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-09-16 18:04:05 +0200
committertycho <work.tycho@gmail.com>2015-09-18 17:27:32 +0200
commitdd168b0e8b0b814a9e82d7941dbd0137fe09beb9 (patch)
tree0290ae524adb44f2c1909a0edc8c7cc5e1d29c44 /src/Chunk.h
parentMerge pull request #2480 from cuberite/CircleCiCheckBasicStyle (diff)
downloadcuberite-dd168b0e8b0b814a9e82d7941dbd0137fe09beb9.tar
cuberite-dd168b0e8b0b814a9e82d7941dbd0137fe09beb9.tar.gz
cuberite-dd168b0e8b0b814a9e82d7941dbd0137fe09beb9.tar.bz2
cuberite-dd168b0e8b0b814a9e82d7941dbd0137fe09beb9.tar.lz
cuberite-dd168b0e8b0b814a9e82d7941dbd0137fe09beb9.tar.xz
cuberite-dd168b0e8b0b814a9e82d7941dbd0137fe09beb9.tar.zst
cuberite-dd168b0e8b0b814a9e82d7941dbd0137fe09beb9.zip
Diffstat (limited to 'src/Chunk.h')
-rw-r--r--src/Chunk.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Chunk.h b/src/Chunk.h
index fd9ea0b0c..683965c62 100644
--- a/src/Chunk.h
+++ b/src/Chunk.h
@@ -439,7 +439,12 @@ public:
void SetAlwaysTicked(bool a_AlwaysTicked);
// Makes a copy of the list
- cClientHandleList GetAllClients(void) const {return m_LoadedByClient; }
+ cClientHandleList GetAllClients(void) const
+ {
+ cClientHandleList copy;
+ std::copy(m_LoadedByClient.begin(), m_LoadedByClient.end(), std::back_inserter(copy));
+ return copy;
+ }
private:
@@ -479,9 +484,9 @@ private:
sSetBlockQueueVector m_SetBlockQueue; ///< Block changes that are queued to a specific tick
// A critical section is not needed, because all chunk access is protected by its parent ChunkMap's csLayers
- cClientHandleList m_LoadedByClient;
- cEntityList m_Entities;
- cBlockEntityList m_BlockEntities;
+ std::vector<cClientHandle *> m_LoadedByClient;
+ cEntityList m_Entities;
+ cBlockEntityList m_BlockEntities;
/** Number of times the chunk has been requested to stay (by various cChunkStay objects); if zero, the chunk can be unloaded */
int m_StayCount;