summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-09-19 16:12:54 +0200
committerpeterbell10 <peterbell10@live.co.uk>2017-09-19 16:12:54 +0200
commit30c8470a524f5d09f157d5c1c59eb72c205d5085 (patch)
tree38547152d6e7f4c3c9c2a5c1165f7d8bda52b8c8 /src/ChunkMap.cpp
parentcRoot: Make PollPeriod representation 32 bit (#4030) (diff)
downloadcuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.gz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.bz2
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.lz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.xz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.zst
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkMap.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 8b98254c4..dff62f69d 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -305,12 +305,12 @@ void cChunkMap::BroadcastUnleashEntity(const cEntity & a_Entity)
-void cChunkMap::BroadcastBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType, const cClientHandle * a_Exclude)
+void cChunkMap::BroadcastBlockAction(Vector3i a_BlockPos, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType, const cClientHandle * a_Exclude)
{
cCSLock Lock(m_CSChunks);
int x, z, ChunkX, ChunkZ;
- x = a_BlockX;
- z = a_BlockZ;
+ x = a_BlockPos.x;
+ z = a_BlockPos.z;
cChunkDef::BlockToChunk(x, z, ChunkX, ChunkZ);
cChunkPtr Chunk = GetChunkNoGen(ChunkX, ChunkZ);
if (Chunk == nullptr)
@@ -318,7 +318,7 @@ void cChunkMap::BroadcastBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, c
return;
}
// It's perfectly legal to broadcast packets even to invalid chunks!
- Chunk->BroadcastBlockAction(a_BlockX, a_BlockY, a_BlockZ, a_Byte1, a_Byte2, a_BlockType, a_Exclude);
+ Chunk->BroadcastBlockAction(a_BlockPos, a_Byte1, a_Byte2, a_BlockType, a_Exclude);
}
@@ -605,19 +605,19 @@ void cChunkMap::BroadcastRemoveEntityEffect(const cEntity & a_Entity, int a_Effe
-void cChunkMap::BroadcastSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude)
+void cChunkMap::BroadcastSoundEffect(const AString & a_SoundName, Vector3d a_Position, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude)
{
cCSLock Lock(m_CSChunks);
int ChunkX, ChunkZ;
- cChunkDef::BlockToChunk(FloorC(std::floor(a_X)), FloorC(std::floor(a_Z)), ChunkX, ChunkZ);
+ cChunkDef::BlockToChunk(FloorC(std::floor(a_Position.x)), FloorC(std::floor(a_Position.z)), ChunkX, ChunkZ);
cChunkPtr Chunk = GetChunkNoGen(ChunkX, ChunkZ);
if (Chunk == nullptr)
{
return;
}
// It's perfectly legal to broadcast packets even to invalid chunks!
- Chunk->BroadcastSoundEffect(a_SoundName, a_X, a_Y, a_Z, a_Volume, a_Pitch, a_Exclude);
+ Chunk->BroadcastSoundEffect(a_SoundName, a_Position, a_Volume, a_Pitch, a_Exclude);
}
@@ -659,18 +659,18 @@ void cChunkMap::BroadcastSpawnEntity(cEntity & a_Entity, const cClientHandle * a
-void cChunkMap::BroadcastThunderbolt(int a_BlockX, int a_BlockY, int a_BlockZ, const cClientHandle * a_Exclude)
+void cChunkMap::BroadcastThunderbolt(Vector3i a_BlockPos, const cClientHandle * a_Exclude)
{
cCSLock Lock(m_CSChunks);
int ChunkX, ChunkZ;
- cChunkDef::BlockToChunk(a_BlockX, a_BlockZ, ChunkX, ChunkZ);
+ cChunkDef::BlockToChunk(a_BlockPos.x, a_BlockPos.z, ChunkX, ChunkZ);
cChunkPtr Chunk = GetChunkNoGen(ChunkX, ChunkZ);
if (Chunk == nullptr)
{
return;
}
// It's perfectly legal to broadcast packets even to invalid chunks!
- Chunk->BroadcastThunderbolt(a_BlockX, a_BlockY, a_BlockZ, a_Exclude);
+ Chunk->BroadcastThunderbolt(a_BlockPos, a_Exclude);
}